Skip to content

Commit 39fdeb1

Browse files
committed
Merge pull request #1602 from wheelsandcogs/2.0
Fixed nonce expiry example
2 parents 95c6b41 + 5df90c9 commit 39fdeb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/security/custom_authentication_provider.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ the ``PasswordDigest`` header value matches with the user's password.
226226
}
227227
228228
// Validate nonce is unique within 5 minutes
229-
if (file_exists($this->cacheDir.'/'.$nonce) && file_get_contents($this->cacheDir.'/'.$nonce) + 300 < time()) {
229+
if (file_exists($this->cacheDir.'/'.$nonce) && file_get_contents($this->cacheDir.'/'.$nonce) + 300 > time()) {
230230
throw new NonceExpiredException('Previously used nonce detected');
231231
}
232232
file_put_contents($this->cacheDir.'/'.$nonce, time());

0 commit comments

Comments
 (0)