From: skodak Date: Mon, 1 May 2006 21:32:49 +0000 (+0000) Subject: fixed alternative salt index range - now allowed 1...20 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=aaeaa4b00724ec66fa85133ceca586f1fc416ed6;p=moodle.git fixed alternative salt index range - now allowed 1...20 --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index c09e813935..576da03c5e 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -2658,7 +2658,7 @@ function validate_internal_user_password(&$user, $password) { or $user->password == md5($convpassword.$CFG->passwordsaltmain) or $user->password == md5($convpassword)) { $validated = true; } else { - for ($i=0; $i<20; $i++) { //20 alternative salts should be enough, right? + for ($i=1; $i<=20; $i++) { //20 alternative salts should be enough, right? $alt = 'passwordsaltalt'.$i; if (!empty($CFG->$alt)) { if ($user->password == md5($password.$CFG->$alt) or $user->password == md5($convpassword.$CFG->$alt)) {