mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 06:28:28 +03:00
Detect IMAP LOGINDISABLED capability
Enable IMAP SASL-IR capability
This commit is contained in:
parent
f17609b442
commit
bb836fdb59
1 changed files with 3 additions and 4 deletions
|
|
@ -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)))
|
||||
if (!strlen(\trim($sLogin)) || !strlen(\trim($sPassword)) || $this->IsSupported('LOGINDISABLED'))
|
||||
{
|
||||
$this->writeLogException(
|
||||
new \MailSo\Base\Exceptions\InvalidArgumentException,
|
||||
|
|
@ -190,8 +190,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
{
|
||||
$sToken = $SASL->authenticate($sLogin, $sPassword, $sTicket);
|
||||
|
||||
$sTicket = \base64_decode($sTicket);
|
||||
$this->oLogger->Write('ticket: '.$sTicket);
|
||||
$this->oLogger->Write('ticket: '.\base64_decode($sTicket));
|
||||
|
||||
if ($this->oLogger)
|
||||
{
|
||||
|
|
@ -223,7 +222,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
$this->oLogger->AddSecret($sToken);
|
||||
}
|
||||
|
||||
if ($this->IsSupported('AUTH=SASL-IR') && false)
|
||||
if ($this->IsSupported('SASL-IR'))
|
||||
{
|
||||
$this->SendRequestGetResponse('AUTHENTICATE', array('PLAIN', $sToken));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue