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

AttributeMap: Fix infinite loop when overwriting attributes with AttributeMap.

Thanks to Brook Schofield for implementing this fix!

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3278 44740490-163a-0410-bde0-09ae8108e29a
parent 106f0ac9
No related branches found
No related tags found
No related merge requests found
......@@ -82,13 +82,16 @@ class sspmod_core_Auth_Process_AttributeMap extends SimpleSAML_Auth_ProcessingFi
foreach($attributes as $name => $values) {
if(array_key_exists($name, $this->map)) {
unset($attributes[$name]);
if(!is_array($this->map[$name])) {
unset($attributes[$name]);
$attributes[$this->map[$name]] = $values;
} else {
foreach($this->map[$name] as $to_map) {
$attributes[$to_map] = $values;
}
if (!in_array($name, $this->map[$name])) {
unset($attributes[$name]);
}
}
}
}
......
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