summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2012-05-16 11:18:24 +0200
committerAndreas Gohr <gohr@cosmocode.de>2012-05-16 11:19:36 +0200
commitba6e9e9bd8c1ead8b4cd4afabf582b979b8b30e2 (patch)
tree4dac1717c69ec14b32d63fe20ea115bdf2b5ab34
parent16f15a8172591c8e5725677b192ec836030b424a (diff)
downloadrpg-ba6e9e9bd8c1ead8b4cd4afabf582b979b8b30e2.tar.gz
rpg-ba6e9e9bd8c1ead8b4cd4afabf582b979b8b30e2.tar.bz2
make sure SSO data for AD backend is always UTF-8
In some circumstances the username was set in latin1.
-rw-r--r--inc/auth/ad.class.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php
index bc4168527..e161c2939 100644
--- a/inc/auth/ad.class.php
+++ b/inc/auth/ad.class.php
@@ -70,6 +70,9 @@ class auth_ad extends auth_basic {
}
// Prepare SSO
+ if(!utf8_check($_SERVER['REMOTE_USER'])){
+ $_SERVER['REMOTE_USER'] = utf8_encode($_SERVER['REMOTE_USER']);
+ }
if($_SERVER['REMOTE_USER'] && $this->cnf['sso']){
// remove possible NTLM domain
list($dom,$usr) = explode('\\',$_SERVER['REMOTE_USER'],2);