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

saml2_Message: Support decoding of base64-encoded attributes.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1627 44740490-163a-0410-bde0-09ae8108e29a
parent 8e065b62
No related branches found
No related tags found
No related merge requests found
......@@ -667,6 +667,23 @@ class sspmod_saml2_Message {
}
/* As far as we can tell, the assertion is valid. */
/* Maybe we need to base64 decode the attributes in the assertion? */
if ($idpMetadata->getBoolean('base64attributes', FALSE)) {
$attributes = $assertion->getAttributes();
$newAttributes = array();
foreach ($attributes as $name => $values) {
$newAttributes[$name] = array();
foreach ($values as $value) {
foreach(explode('_', $value) AS $v) {
$newAttributes[$name][] = base64_decode($v);
}
}
}
$assertion->setAttributes($newAttributes);
}
return $assertion;
}
......
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