]> git.mjollnir.org Git - moodle.git/commitdiff
fixed alternative salt index range - now allowed 1...20
authorskodak <skodak>
Mon, 1 May 2006 21:32:49 +0000 (21:32 +0000)
committerskodak <skodak>
Mon, 1 May 2006 21:32:49 +0000 (21:32 +0000)
lib/moodlelib.php

index c09e81393531849192317366cf4c7e8d227affbd..576da03c5ea23a351fdaa51bc1e0737af07e8c75 100644 (file)
@@ -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)) {