From 08c18492e9f4955778c2006779e0c207febc1354 Mon Sep 17 00:00:00 2001 From: Ben Plessinger Date: Mon, 9 Jan 2017 17:14:38 -0500 Subject: [PATCH 1/2] fix notices in xdsamlauth notices are thrown if the idp does not have the right indexes --- classes/Authentication/SAML/XDSamlAuthentication.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Authentication/SAML/XDSamlAuthentication.php b/classes/Authentication/SAML/XDSamlAuthentication.php index 2a4885203f..3e22480f7f 100644 --- a/classes/Authentication/SAML/XDSamlAuthentication.php +++ b/classes/Authentication/SAML/XDSamlAuthentication.php @@ -113,10 +113,10 @@ public function getLoginLink() $orgDisplay = ""; $icon = ""; foreach ($idpAuth as $idp) { - if ($idp['OrganizationDisplayName']) { + if (array_key_exists('OrganizationDisplayName', $idp) && !empty($idp['OrganizationDisplayName'])) { $orgDisplay = $idp['OrganizationDisplayName']; } - if ($idp['icon']) { + if (array_key_exists('icon', $idp) && !empty($idp['icon'])) { $icon = $idp['icon']; } } From 48b1248fd6f040719d1aca5b4bc0bd63fdabc8c8 Mon Sep 17 00:00:00 2001 From: Ben Plessinger Date: Tue, 10 Jan 2017 16:56:00 -0500 Subject: [PATCH 2/2] Update XDSamlAuthentication.php changes per code review --- classes/Authentication/SAML/XDSamlAuthentication.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Authentication/SAML/XDSamlAuthentication.php b/classes/Authentication/SAML/XDSamlAuthentication.php index 3e22480f7f..7e59371e96 100644 --- a/classes/Authentication/SAML/XDSamlAuthentication.php +++ b/classes/Authentication/SAML/XDSamlAuthentication.php @@ -113,10 +113,10 @@ public function getLoginLink() $orgDisplay = ""; $icon = ""; foreach ($idpAuth as $idp) { - if (array_key_exists('OrganizationDisplayName', $idp) && !empty($idp['OrganizationDisplayName'])) { + if (!empty($idp['OrganizationDisplayName'])) { $orgDisplay = $idp['OrganizationDisplayName']; } - if (array_key_exists('icon', $idp) && !empty($idp['icon'])) { + if (!empty($idp['icon'])) { $icon = $idp['icon']; } }