Apply commit ec82fe0 again, this time without trying to detect binary values. Apparently, norwegian letters are considered non-printable by ctype_print().
git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@3370 44740490-163a-0410-bde0-09ae8108e29a
This commit is contained in:
parent
ba995e8da6
commit
053c7aeac7
|
@ -361,6 +361,25 @@ class SimpleSAML_Auth_LDAP {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// parse each entry and process its attributes
|
||||||
|
for ($i = 0; $i < $results['count']; $i++) {
|
||||||
|
$entry = $results[$i];
|
||||||
|
|
||||||
|
// iterate over the attributes of the entry
|
||||||
|
for ($j = 0; $j < $entry['count']; $j++) {
|
||||||
|
$name = $entry[$j];
|
||||||
|
$attribute = $entry[$name];
|
||||||
|
|
||||||
|
// decide whether to base64 encode or not
|
||||||
|
for ($k = 0; $k < $attribute['count']; $k++) {
|
||||||
|
// base64 encode binary attributes
|
||||||
|
if (strtolower($name) === 'jpegphoto') {
|
||||||
|
$results[$i][$name][$k] = base64_encode($attribute[$k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the count and return
|
// Remove the count and return
|
||||||
unset($results['count']);
|
unset($results['count']);
|
||||||
return $results;
|
return $results;
|
||||||
|
|
Reference in New Issue