diff options
author | umgfoin <umgfoin@users.noreply.github.com> | 2018-01-29 17:02:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 17:02:27 +0300 |
commit | d043c1f09abecb73333b5d579069fac7cb8ac830 (patch) | |
tree | 0fc1b8a37ec241f9a2e916fbcc779cb1406b5e8f | |
parent | f8fb4d98464254c037b330d4a17c9851b7bee823 (diff) |
Fix inappropriate SQL-quoting in imap.php
External user-authentification against IMAP-gateways:
Commit f8fb4d9 broke compatibility with PostgreSQL due to inappropriate SQL-quoting.
-rw-r--r-- | user_external/lib/imap.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/user_external/lib/imap.php b/user_external/lib/imap.php index e53fb4605..046ba94c6 100644 --- a/user_external/lib/imap.php +++ b/user_external/lib/imap.php @@ -52,11 +52,11 @@ class OC_User_IMAP extends \OCA\user_external\Base { $uid = str_replace("%40","@",$uid); } - $result = OC_DB::executeAudited( - 'SELECT `userid` FROM `*PREFIX*preferences`' - . ' WHERE `appid` = "settings" AND `configkey` = "email" AND `configvalue` = ?', - array($uid) - ); + $result = OC_DB::executeAudited( + 'SELECT `userid` FROM `*PREFIX*preferences` WHERE `appid`=? AND `configkey`=? AND `configvalue`=?', + array('settings','email',$uid) + ); + $users = array(); while ($row = $result->fetchRow()) { $users[] = $row['userid']; |