From 034a6ef057dec488ef93d8f1d83191f6b8c30ad3 Mon Sep 17 00:00:00 2001 From: umgfoin Date: Mon, 29 Jan 2018 15:02:27 +0100 Subject: [PATCH] Fix inappropriate SQL-quoting in imap.php External user-authentification against IMAP-gateways: Commit f8fb4d9 broke compatibility with PostgreSQL due to inappropriate SQL-quoting. --- lib/imap.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/imap.php b/lib/imap.php index e53fb46..046ba94 100644 --- a/lib/imap.php +++ b/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'];