From ba6e9e9bd8c1ead8b4cd4afabf582b979b8b30e2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 16 May 2012 11:18:24 +0200 Subject: make sure SSO data for AD backend is always UTF-8 In some circumstances the username was set in latin1. --- inc/auth/ad.class.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc/auth') 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); -- cgit v1.2.3