diff options
author | umgfoin <umgfoin@users.noreply.github.com> | 2018-01-29 17:02:27 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-29 18:14:18 +0300 |
commit | e351592bc9a9fa6f3fbdd487c47b8d00b73ae9f1 (patch) | |
tree | 0fc1b8a37ec241f9a2e916fbcc779cb1406b5e8f | |
parent | f8fb4d98464254c037b330d4a17c9851b7bee823 (diff) |
Fix inappropriate SQL-quoting in imap.phpv13.0.9RC2v13.0.9RC1v13.0.9v13.0.8RC2v13.0.8RC1v13.0.8v13.0.7RC2v13.0.7RC1v13.0.7v13.0.6RC1v13.0.6v13.0.5RC2v13.0.5RC1v13.0.5v13.0.4v13.0.3RC2v13.0.3RC1v13.0.3v13.0.2RC1v13.0.2v13.0.1RC1v13.0.12RC1v13.0.12v13.0.11RC1v13.0.11v13.0.10v13.0.1v13.0.0RC4v13.0.0stable13
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']; |