Skip to content
Snippets Groups Projects
Commit e9666d6f authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by David Siegfried
Browse files

adjust to changes of spomky otphp lib, fixes #4980

Closes #4980

Merge request studip/studip!3740
parent b28c3d4a
No related branches found
No related tags found
No related merge requests found
...@@ -24,8 +24,8 @@ class TFASecret extends SimpleORMap ...@@ -24,8 +24,8 @@ class TFASecret extends SimpleORMap
// period of time with a larger window to accept them). // period of time with a larger window to accept them).
const TYPES = [ const TYPES = [
'email' => [ 'email' => [
'window' => 60, 'window' => 10,
'period' => 5, 'period' => 30,
], ],
'app' => [ 'app' => [
'window' => 1, 'window' => 1,
...@@ -172,7 +172,7 @@ class TFASecret extends SimpleORMap ...@@ -172,7 +172,7 @@ class TFASecret extends SimpleORMap
$window = self::TYPES[$this->type]['window']; $window = self::TYPES[$this->type]['window'];
if ($allow_reuse) { if ($allow_reuse) {
$window = 0; $window = null;
} }
if ($this->getTOTP()->verify($token, $timestamp, $window)) { if ($this->getTOTP()->verify($token, $timestamp, $window)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment