From 19797bae1cabd9ac7bcd11bddf3bdc8d3b7c6d41 Mon Sep 17 00:00:00 2001
From: Enrico Cavalli <enricocavalli@users.noreply.github.com>
Date: Wed, 3 Jun 2015 17:00:26 +0200
Subject: [PATCH] Corrected logic in checkSessionCookie

Raise InvalidArgumentException if $retryURL is not a string AND is not null
---
 lib/SimpleSAML/Utils/HTTP.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/SimpleSAML/Utils/HTTP.php b/lib/SimpleSAML/Utils/HTTP.php
index 7518bfa6d..8b0caf307 100644
--- a/lib/SimpleSAML/Utils/HTTP.php
+++ b/lib/SimpleSAML/Utils/HTTP.php
@@ -271,7 +271,7 @@ class HTTP
      */
     public static function checkSessionCookie($retryURL = null)
     {
-        if (!is_string($retryURL) || !is_null($retryURL)) {
+        if (!is_string($retryURL) && !is_null($retryURL)) {
             throw new \InvalidArgumentException('Invalid input parameters.');
         }
 
@@ -1024,4 +1024,4 @@ class HTTP
         $p->show();
         exit(0);
     }
-}
\ No newline at end of file
+}
-- 
GitLab