Skip to content
Snippets Groups Projects
Commit 54f02a5b authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

base64 decoding of attributes in shib13 sp

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@134 44740490-163a-0410-bde0-09ae8108e29a
parent db227427
No related branches found
No related tags found
No related merge requests found
...@@ -193,6 +193,7 @@ class SimpleSAML_XML_Shib13_AuthnResponse extends SimpleSAML_XML_AuthnResponse { ...@@ -193,6 +193,7 @@ class SimpleSAML_XML_Shib13_AuthnResponse extends SimpleSAML_XML_AuthnResponse {
$md = $this->metadata->getMetadata($this->getIssuer(), 'shib13-idp-remote'); $md = $this->metadata->getMetadata($this->getIssuer(), 'shib13-idp-remote');
$base64 = isset($md['base64attributes']) ? $md['base64attributes'] : false;
//$base64 = isset($md['base64attributes']) ? $md['base64attributes'] : false; //$base64 = isset($md['base64attributes']) ? $md['base64attributes'] : false;
...@@ -251,7 +252,18 @@ class SimpleSAML_XML_Shib13_AuthnResponse extends SimpleSAML_XML_AuthnResponse { ...@@ -251,7 +252,18 @@ class SimpleSAML_XML_Shib13_AuthnResponse extends SimpleSAML_XML_AuthnResponse {
$values = array(); $values = array();
// Traverse Values // Traverse Values
foreach ($attribute->AttributeValue AS $val) { foreach ($attribute->AttributeValue AS $newvalue) {
if ($base64) {
$encodedvalues = explode('_', $newvalue);
foreach($encodedvalues AS $v) {
$values[] = base64_decode($v);
}
} else {
$values[] = $newvalue;
}
$values[] = (string) $val; $values[] = (string) $val;
} }
......
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