From d8b85655d77777fdb2a98021e7a00aeb8532f737 Mon Sep 17 00:00:00 2001 From: Jaime Perez Crespo <jaime.perez@uninett.no> Date: Wed, 15 Apr 2015 20:17:01 +0200 Subject: [PATCH] Substitute "or" and "and" operators by "||" and "&&", respectively. --- modules/adfs/lib/IdP/ADFS.php | 2 +- modules/negotiate/lib/Auth/Source/Negotiate.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/adfs/lib/IdP/ADFS.php b/modules/adfs/lib/IdP/ADFS.php index d7fc51f11..39b2a3049 100644 --- a/modules/adfs/lib/IdP/ADFS.php +++ b/modules/adfs/lib/IdP/ADFS.php @@ -75,7 +75,7 @@ class sspmod_adfs_IdP_ADFS { $hasValue = FALSE; $r = '<saml:Attribute AttributeNamespace="http://schemas.xmlsoap.org/claims" AttributeName="' . htmlspecialchars($name) .'">'; foreach ($values as $value) { - if ( (!isset($value)) or ($value === '')) continue; + if ( (!isset($value)) || ($value === '')) continue; $r .= '<saml:AttributeValue>' . htmlspecialchars($value) . '</saml:AttributeValue>'; $hasValue = TRUE; } diff --git a/modules/negotiate/lib/Auth/Source/Negotiate.php b/modules/negotiate/lib/Auth/Source/Negotiate.php index 07893002a..6feeb9edc 100644 --- a/modules/negotiate/lib/Auth/Source/Negotiate.php +++ b/modules/negotiate/lib/Auth/Source/Negotiate.php @@ -75,15 +75,15 @@ class sspmod_negotiate_Auth_Source_Negotiate extends SimpleSAML_Auth_Source { // Check for disabled SPs. The disable flag is store in the SP // metadata. - if (array_key_exists('SPMetadata', $state) and $this->spDisabledInMetadata($state['SPMetadata'])) + if (array_key_exists('SPMetadata', $state) && $this->spDisabledInMetadata($state['SPMetadata'])) $this->fallBack($state); // Go straight to fallback if Negotiate is disabled or if you are // sent back to the IdP directly from the SP after having logged out $session = SimpleSAML_Session::getSessionFromRequest(); $disabled = $session->getData('negotiate:disable', 'session'); - if ($disabled or - (!empty($_COOKIE['NEGOTIATE_AUTOLOGIN_DISABLE_PERMANENT']) and + if ($disabled || + (!empty($_COOKIE['NEGOTIATE_AUTOLOGIN_DISABLE_PERMANENT']) && $_COOKIE['NEGOTIATE_AUTOLOGIN_DISABLE_PERMANENT'] == 'True')) { SimpleSAML_Logger::debug('Negotiate - session disabled. falling back'); $this->fallBack($state); -- GitLab