From f63dfa52947bf0e372198a07ca23d6c75fc85388 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 11 Dec 2019 10:15:05 +0100 Subject: [PATCH] DbUserBackend: Use binary string comparison if it's a mysql db --- library/Icinga/Authentication/User/DbUserBackend.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/User/DbUserBackend.php b/library/Icinga/Authentication/User/DbUserBackend.php index 35a0c3cc6..bc84c7b74 100644 --- a/library/Icinga/Authentication/User/DbUserBackend.php +++ b/library/Icinga/Authentication/User/DbUserBackend.php @@ -186,8 +186,9 @@ class DbUserBackend extends DbRepository implements UserBackendInterface, Inspec $query = $this->ds->select() ->from($this->prependTablePrefix('user'), $columns) - ->where('name', $username) + ->where(($this->ds->getDbType() === 'mysql' ? 'BINARY ' : '') . 'name', $username) ->where('active', true); + $statement = $this->ds->getDbAdapter()->prepare($query->getSelectQuery()); $statement->execute(); $statement->bindColumn(1, $lob, PDO::PARAM_LOB);