Commit b4f7ead1043f39bbcbc6222f36e0792806ca3589
1 parent
ac9b09a8
passwords need to have a minimum length (6) as defined in config.ini (passwordLength)
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4599 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
12 additions
and
1 deletions
config/config.ini
preferences.php
| ... | ... | @@ -78,6 +78,14 @@ class PreferencesDispatcher extends KTStandardDispatcher { |
| 78 | 78 | } else if ($password !== $confirm_password) { |
| 79 | 79 | $this->errorRedirectToMain(_("The passwords you specified do not match.")); |
| 80 | 80 | } |
| 81 | + | |
| 82 | + $KTConfig =& KTConfig::getSingleton(); | |
| 83 | + $minLength = ((int) $KTConfig->get('user_prefs/passwordLength', 6)); | |
| 84 | + | |
| 85 | + if (strlen($password) < $minLength) { | |
| 86 | + $this->errorRedirectToMain(sprintf(_("Your password is too short - passwords must be at least %d characters long."), $minLength)); | |
| 87 | + } | |
| 88 | + | |
| 81 | 89 | // FIXME more validation would be useful. |
| 82 | 90 | // validated and ready.. |
| 83 | 91 | $this->startTransaction(); | ... | ... |