From e96ced3bde334756756e83fa5ea36170a257aad4 Mon Sep 17 00:00:00 2001 From: djmaze Date: Thu, 1 Apr 2021 08:17:02 +0200 Subject: [PATCH] Bugfix: LOGINDISABLED is only for the LOGIN command --- snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php index f0d809d8b..246b89694 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php @@ -149,7 +149,7 @@ class ImapClient extends \MailSo\Net\NetClient public function Login(string $sLogin, string $sPassword, string $sProxyAuthUser = '', bool $bUseAuthPlainIfSupported = true, bool $bUseAuthCramMd5IfSupported = true) : self { - if (!strlen(\trim($sLogin)) || !strlen(\trim($sPassword)) || $this->IsSupported('LOGINDISABLED')) + if (!strlen(\trim($sLogin)) || !strlen(\trim($sPassword))) { $this->writeLogException( new \MailSo\Base\Exceptions\InvalidArgumentException, @@ -161,7 +161,7 @@ class ImapClient extends \MailSo\Net\NetClient $this->sLogginedUser = $sLogin; // $encrypted = !empty(\stream_get_meta_data($this->rConnect)['crypto']); - $type = 'LOGIN'; // RFC3501 6.2.3 + $type = $this->IsSupported('LOGINDISABLED') ? '' : 'LOGIN'; // RFC3501 6.2.3 $types = [ // 'SCRAM-SHA-256' => 1, // !$encrypted // 'SCRAM-SHA-1' => 1, // !$encrypted