mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-25 07:16:21 +08:00
Use SASL-IR for #1245
This commit is contained in:
parent
56a5f29f26
commit
2400c6def8
1 changed files with 7 additions and 1 deletions
|
@ -158,7 +158,13 @@ class ImapClient extends \MailSo\Net\NetClient
|
||||||
{
|
{
|
||||||
if (\str_starts_with($type, 'SCRAM-'))
|
if (\str_starts_with($type, 'SCRAM-'))
|
||||||
{
|
{
|
||||||
$this->sendRaw($this->SendRequestGetResponse('AUTHENTICATE', array($type, $SASL->authenticate($sLogin, $sPassword))));
|
$sAuth = $SASL->authenticate($sLogin, $sPassword);
|
||||||
|
if ($this->hasCapability('SASL-IR')) {
|
||||||
|
$this->sendRaw($this->SendRequestGetResponse('AUTHENTICATE', array($type, $sAuth)));
|
||||||
|
} else {
|
||||||
|
$this->SendRequestGetResponse('AUTHENTICATE', array($type));
|
||||||
|
$this->sendRaw($sAuth);
|
||||||
|
}
|
||||||
$sChallenge = $SASL->challenge($this->getResponseValue($this->getResponse(), Enumerations\ResponseType::CONTINUATION));
|
$sChallenge = $SASL->challenge($this->getResponseValue($this->getResponse(), Enumerations\ResponseType::CONTINUATION));
|
||||||
$this->logMask($sChallenge);
|
$this->logMask($sChallenge);
|
||||||
$this->sendRaw($sChallenge);
|
$this->sendRaw($sChallenge);
|
||||||
|
|
Loading…
Reference in a new issue