auth_internal: use type-strict comparison when checking OTP code

This commit is contained in:
Andrew Dolgov 2020-09-17 08:46:57 +03:00
parent 89d53a7f49
commit 0757ad0406
1 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ class Auth_Internal extends Plugin implements IAuthModule {
$totp_legacy = new \OTPHP\TOTP($secret_legacy);
$otp_check_legacy = $totp_legacy->now();
if ($otp != $otp_check && $otp != $otp_check_legacy) {
if ($otp !== $otp_check && $otp !== $otp_check_legacy) {
return false;
}
} else {