Skip to content

Commit

Permalink
Update GoogleAuthenticator.php
Browse files Browse the repository at this point in the history
Closes chregu#22
  • Loading branch information
Argevollen committed May 12, 2019
1 parent 452e7c3 commit cccc3a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/GoogleAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function checkCode($secret,$code) {
$time = floor(time() / 30);
for ( $i = -1; $i <= 1; $i++) {

if ($this->getCode($secret,$time + $i) == $code) {
if (hash_equals($this->getCode($secret,$time + $i), $code)) {
return true;
}
}
Expand Down

0 comments on commit cccc3a3

Please sign in to comment.