Skip to content

Commit b3d7f25

Browse files
erivelloweaverryan
authored andcommitted
fix timestamp expire validation
1 parent 342c66e commit b3d7f25

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
@@ -220,7 +220,7 @@ the ``PasswordDigest`` header value matches with the user's password.
220220
protected function validateDigest($digest, $nonce, $created, $secret)
221221
{
222222
// Expire timestamp after 5 minutes
223-
if (time() - strtotime($created) > 300) {
223+
if (abs(time() - strtotime($created)) > 300) {
224224
return false;
225225
}
226226

0 commit comments

Comments
 (0)