Permalink
Browse files

Fixed bug in password checking for new admin user ...

  • Loading branch information...
1 parent c5e66fc commit 09ba0c8a32a882cbe0ca9387dba1d47510fc3ebd martin committed Sep 5, 2002
Showing with 2 additions and 1 deletion.
  1. +2 −1 user/edit.php
View
3 user/edit.php
@@ -208,8 +208,9 @@ function find_form_errors(&$user, &$usernew, &$err) {
if (empty($usernew->newpassword) and empty($user->password))
$err["newpassword"] = get_string("missingpassword");
- if ($usernew->newpassword == md5("admin") or $user->password == md5("admin"))
+ if (($usernew->newpassword == "admin") or ($user->password == md5("admin") and empty($usernew->newpassword)) ) {
$err["newpassword"] = get_string("unsafepassword");
+ }
}
if (empty($usernew->email))

0 comments on commit 09ba0c8

Please sign in to comment.