From 49b42c84715d70f11d950c6101df48922a171c06 Mon Sep 17 00:00:00 2001 From: Sebastian L Date: Thu, 18 Mar 2021 11:04:53 +0100 Subject: [PATCH] Only do one curl_close Fixes https://github.com/nextcloud/user_external/issues/172 Signed-off-by: Sebastian L --- lib/imap.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/imap.php b/lib/imap.php index c48fba6..a7ff093 100644 --- a/lib/imap.php +++ b/lib/imap.php @@ -98,9 +98,9 @@ public function checkPassword($uid, $password) { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'CAPABILITY'); $canconnect = curl_exec($ch); + curl_close($ch); if($canconnect) { - curl_close($ch); $uid = mb_strtolower($uid); $this->storeUser($uid, $groups); return $uid; @@ -111,8 +111,6 @@ public function checkPassword($uid, $password) { ); } - curl_close($ch); - return false; } }