Skip to content

Commit

Permalink
make sure SSO data for AD backend is always UTF-8
Browse files Browse the repository at this point in the history
In some circumstances the username was set in latin1.
  • Loading branch information
splitbrain committed May 16, 2012
1 parent 16f15a8 commit ba6e9e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/auth/ad.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ba6e9e9

Please sign in to comment.