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

saml2_Message: Support DOMNodeList as attribute values.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1684 44740490-163a-0410-bde0-09ae8108e29a
parent e6598fea
No related branches found
No related tags found
No related merge requests found
...@@ -472,12 +472,15 @@ class sspmod_saml2_Message { ...@@ -472,12 +472,15 @@ class sspmod_saml2_Message {
$value = (string)$value; $value = (string)$value;
break; break;
case 'base64': case 'base64':
$value = base64_encode($value); $value = base64_encode((string)$value);
break; break;
case 'raw': case 'raw':
$doc = new DOMDocument(); if (is_string($value)) {
$doc->loadXML('<root>' . $value . '</root>'); $doc = new DOMDocument();
$value = $doc->firstChild->childNodes; $doc->loadXML('<root>' . $value . '</root>');
$value = $doc->firstChild->childNodes;
}
assert('$value instanceof DOMNodeList');
break; break;
default: default:
throw new SimpleSAML_Error_Exception('Invalid encoding for attribute ' . throw new SimpleSAML_Error_Exception('Invalid encoding for attribute ' .
......
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