Skip to content
Browse files

make sure SSO data for AD backend is always UTF-8

In some circumstances the username was set in latin1.
  • Loading branch information...
1 parent 16f15a8 commit ba6e9e9bd8c1ead8b4cd4afabf582b979b8b30e2 @splitbrain committed May 16, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 inc/auth/ad.class.php
View
3 inc/auth/ad.class.php
@@ -70,6 +70,9 @@ function __construct() {
}
// 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);

0 comments on commit ba6e9e9

Please sign in to comment.
Something went wrong with that request. Please try again.