From f0a323fc6ac0de60d27625d48355978bfe627b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no> Date: Thu, 10 Aug 2017 16:47:13 +0200 Subject: [PATCH] bugfix: NameIDs are created now as objects, so their information can't any longer be accessed as an array. --- .../lib/Auth/Process/PersistentNameID2TargetedID.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/saml/lib/Auth/Process/PersistentNameID2TargetedID.php b/modules/saml/lib/Auth/Process/PersistentNameID2TargetedID.php index 25ae97f1a..119a0d477 100644 --- a/modules/saml/lib/Auth/Process/PersistentNameID2TargetedID.php +++ b/modules/saml/lib/Auth/Process/PersistentNameID2TargetedID.php @@ -69,16 +69,6 @@ class sspmod_saml_Auth_Process_PersistentNameID2TargetedID extends SimpleSAML_Au /** @var \SAML2\XML\saml\NameID $nameID */ $nameID = $state['saml:NameID'][\SAML2\Constants::NAMEID_PERSISTENT]; - if ($this->nameId) { - $doc = \SAML2\DOMDocumentFactory::create(); - $root = $doc->createElement('root'); - $doc->appendChild($root); - $nameID->toXML($root); - $value = $doc->saveXML($root->firstChild); - } else { - $value = $nameID['Value']; - } - - $state['Attributes'][$this->attribute] = array($value); + $state['Attributes'][$this->attribute] = array((!$this->nameId) ? $nameID->value : $nameID); } } -- GitLab