Skip to content

Commit 9cfd163

Browse files
erivelloweaverryan
authored andcommitted
add a check on created date in the future
1 parent 5618697 commit 9cfd163

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cookbook/security/custom_authentication_provider.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ the ``PasswordDigest`` header value matches with the user's password.
219219
220220
protected function validateDigest($digest, $nonce, $created, $secret)
221221
{
222+
// Check created time is not in the future
223+
if (strtotime($created) > time()) {
224+
return false;
225+
}
226+
222227
// Expire timestamp after 5 minutes
223228
if (time() - strtotime($created) > 300) {
224229
return false;

0 commit comments

Comments
 (0)