Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5df90c9

Browse filesBrowse files
committed
Fixed nonce expiry example
With the existing example, nonces can be  re-used for five minutes and then expire, which is the reverse of the desired effect.
1 parent 7aa023d commit 5df90c9
Copy full SHA for 5df90c9

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎cookbook/security/custom_authentication_provider.rst

Copy file name to clipboardExpand all lines: cookbook/security/custom_authentication_provider.rst
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.