Skip to content

Commit

Permalink
Case insensitive for LDAP
Browse files Browse the repository at this point in the history
  • Loading branch information
tmachyshyn committed Sep 24, 2018
1 parent 158cdd2 commit 5ae0b5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/Espo/Core/Utils/Authentication/LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected function loginByToken($username, \Espo\Entities\AuthToken $authToken =
$user = $this->getEntityManager()->getEntity('User', $userId);

$tokenUsername = $user->get('userName');
if ($username != $tokenUsername) {
if (strtolower($username) != strtolower($tokenUsername)) {
$GLOBALS['log']->alert('Unauthorized access attempt for user ['.$username.'] from IP ['.$_SERVER['REMOTE_ADDR'].']');
return null;
}
Expand Down

0 comments on commit 5ae0b5a

Please sign in to comment.