summaryrefslogtreecommitdiffstats
path: root/lib/SAML2
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2013-09-02 12:06:03 +0000
committerOlav Morken <olav.morken@uninett.no>2013-09-02 12:06:03 +0000
commit92cae5727d3feb1f6fb98b06f9607b37d8f290e4 (patch)
tree28a592285bb86c505698297806c3421cdcefe7b2 /lib/SAML2
parent27b6b15d6d633d8627696c0532b4eac71f94c611 (diff)
downloadsimplesamlphp-92cae5727d3feb1f6fb98b06f9607b37d8f290e4.zip
simplesamlphp-92cae5727d3feb1f6fb98b06f9607b37d8f290e4.tar.gz
simplesamlphp-92cae5727d3feb1f6fb98b06f9607b37d8f290e4.tar.bz2
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
Diffstat (limited to 'lib/SAML2')
-rw-r--r--lib/SAML2/AuthnRequest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/SAML2/AuthnRequest.php b/lib/SAML2/AuthnRequest.php
index f945cdd..8d57760 100644
--- a/lib/SAML2/AuthnRequest.php
+++ b/lib/SAML2/AuthnRequest.php
@@ -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);