diff --git a/modules/saml/lib/Message.php b/modules/saml/lib/Message.php index 03d3949a597a44db7d5f1846ec1a582068cfb007..da841b5bb4fc9fee15daa99c3036ea1d2efca815 100644 --- a/modules/saml/lib/Message.php +++ b/modules/saml/lib/Message.php @@ -587,8 +587,9 @@ class sspmod_saml_Message { $found = FALSE; $lastError = 'No SubjectConfirmation element in Subject.'; + $validSCMethods = array(SAML2_Const::CM_BEARER, SAML2_Const::CM_HOK, SAML2_Const::CM_VOUCHES); foreach ($assertion->getSubjectConfirmation() as $sc) { - if ($sc->Method !== SAML2_Const::CM_BEARER && $sc->Method !== SAML2_Const::CM_HOK) { + if (!in_array($sc->Method, $validSCMethods)) { $lastError = 'Invalid Method on SubjectConfirmation: ' . var_export($sc->Method, TRUE); continue; }