From 5b0979a8b22eb10091696ab55829a853e96b7dfa Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Wed, 28 Aug 2019 20:36:45 +0200 Subject: [PATCH] Fix loose comparison --- modules/saml/lib/Message.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/saml/lib/Message.php b/modules/saml/lib/Message.php index 42632885e..0d5ab93e7 100644 --- a/modules/saml/lib/Message.php +++ b/modules/saml/lib/Message.php @@ -818,12 +818,12 @@ class Message } $notBefore = $scd->getNotBefore(); - if ($notBefore && $notBefore > time() + 60) { + if (is_int($notBefore) && $notBefore > time() + 60) { $lastError = 'NotBefore in SubjectConfirmationData is in the future: '.$notBefore; continue; } $notOnOrAfter = $scd->getNotOnOrAfter(); - if ($notOnOrAfter && $notOnOrAfter <= time() - 60) { + if (is_int($notOnOrAfter) && $notOnOrAfter <= time() - 60) { $lastError = 'NotOnOrAfter in SubjectConfirmationData is in the past: '.$notOnOrAfter; continue; } -- GitLab