Skip to content
Snippets Groups Projects
Commit 92cae572 authored by Olav Morken's avatar Olav Morken
Browse files

SAML2: Add Scoping-element to AuthnRequest even if IDPList isn't specified.

The Scoping-element should be added as soom as we want to include
RequesterID, IDPList or ProxyCount in the message. We must therefore
add it even if IDPList isn't specified.

Thanks to Lucas van Lierop for finding this bug!

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3265 44740490-163a-0410-bde0-09ae8108e29a
parent 27b6b15d
No related branches found
No related tags found
No related merge requests found
......@@ -467,6 +467,7 @@ class SAML2_AuthnRequest extends SAML2_Request {
if ($this->ProxyCount !== null || count($this->IDPList) > 0 || count($this->RequesterID) > 0) {
$scoping = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'Scoping');
$root->appendChild($scoping);
if ($this->ProxyCount !== null) {
$scoping->setAttribute('ProxyCount', $this->ProxyCount);
}
......@@ -478,7 +479,6 @@ class SAML2_AuthnRequest extends SAML2_Request {
$idplist->appendChild($idpEntry);
}
$scoping->appendChild($idplist);
$root->appendChild($scoping);
}
if (count($this->RequesterID) > 0) {
SAML2_Utils::addStrings($scoping, SAML2_Const::NS_SAMLP, 'RequesterID', FALSE, $this->RequesterID);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment