Added another level of check on the reset password key.

master
Loic d'Anterroches 2009-07-02 20:04:46 +02:00
parent c488278ce1
commit 32507085b4
1 changed files with 5 additions and 1 deletions

View File

@ -95,6 +95,10 @@ class IDF_Form_PasswordInputKey extends Pluf_Form
return false; return false;
} }
$cr = new Pluf_Crypt(md5(Pluf::f('secret_key'))); $cr = new Pluf_Crypt(md5(Pluf::f('secret_key')));
return split(':', $cr->decrypt($encrypted), 3); $f = split(':', $cr->decrypt($encrypted), 3);
if (count($f) != 3) {
return false;
}
return $f;
} }
} }