Skip to content

Commit

Permalink
SOAP and AttributeQuery class check
Browse files Browse the repository at this point in the history
SOAP and AttributeQuery class check extending to namespaced classes
  • Loading branch information
szabogyula authored Mar 20, 2019
1 parent d09f5b8 commit 611f5f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/AA/SAML2.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public function getBinding()
{
/* Receiving the attribute query */
$binding = SAML2_Binding::getCurrentBinding();
SimpleSAML_Logger::debug('[aa] binding: '.var_export($binding, true));

/* Supported binding is SOAP */
if (!($binding instanceof SAML2_SOAP)) {
if (!($binding instanceof SAML2_SOAP || $binding instanceof SAML2\SOAP)) {
throw new SimpleSAML_Error_BadRequest('[aa] Unsupported binding. It must be SAML2_SOAP.');
}
SimpleSAML_Logger::debug('[aa] binding: '.var_export($binding, true));

return $binding;
}
Expand All @@ -59,7 +59,7 @@ private function getQuery()
$query = $this->binding->receive();
SimpleSAML_Logger::debug('[aa] query: '.var_export($query, true));

if (!($query instanceof SAML2_AttributeQuery)) {
if (!($query instanceof SAML2_AttributeQuery || $query instanceof SAML2\AttributeQuery)) {
throw new SimpleSAML_Error_BadRequest('Invalid message received on AttributeQuery endpoint.');
}

Expand Down

0 comments on commit 611f5f4

Please sign in to comment.