Fixing issue with site login OTP

Temporary fix with SVN path commit issue
This commit is contained in:
Nathan Adams
2013-08-10 23:34:51 -05:00
parent 5926f62bd1
commit 3f69ca67b7
3 changed files with 7 additions and 4 deletions

View File

@@ -271,7 +271,7 @@ class Pluf_User extends Pluf_Model
} else {
$otp = substr($password, 0, 6);
$pass = substr($password, 6);
$totp = new \OTPHP\TOTP(strtoupper($this->otpkey));
$totp = new \OTPHP\TOTP(strtoupper(Pluf_Utils::convBase($this->otpkey, '0123456789abcdef', 'abcdefghijklmnopqrstuvwxyz234567')));
if ($totp->verify($otp) && $this->password == base64_encode(sha1($pass, TRUE)))
{
return true;