diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-06 17:18:12 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-06 17:18:12 +0000 |
| commit | 75ba4070ecaaa1dcc0dc1f82adf0a0a43f6ddb7c (patch) | |
| tree | c6406af86b98b7893aa0d2a1f37c1c4aeffc7261 /roundcubemail/program/include | |
| parent | d44cc4df994ab7f11cb9ac49f8b654860e832ab4 (diff) | |
- Fix username case-insensitivity issue in MySQL (#1488021)
git-svn-id: https://svn.roundcube.net/trunk@5183 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_user.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcube_user.php b/roundcubemail/program/include/rcube_user.php index 90edad6e9..500b9224d 100644 --- a/roundcubemail/program/include/rcube_user.php +++ b/roundcubemail/program/include/rcube_user.php @@ -399,11 +399,8 @@ class rcube_user { $dbh = rcmail::get_instance()->get_dbh(); - // use BINARY (case-sensitive) comparison on MySQL, other engines are case-sensitive - $mod = preg_match('/^mysql/', $dbh->db_provider) ? 'BINARY' : ''; - // query for matching user name - $query = "SELECT * FROM ".get_table_name('users')." WHERE mail_host = ? AND %s = $mod ?"; + $query = "SELECT * FROM ".get_table_name('users')." WHERE mail_host = ? AND %s = ?"; $sql_result = $dbh->query(sprintf($query, 'username'), $host, $user); // query for matching alias |
