mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-26 07:45:23 +08:00
Workaround Dovecot PREAUTH [CAPABILITY (null)]
issue
This commit is contained in:
parent
7ab9d1a980
commit
ba55b328ea
2 changed files with 8 additions and 1 deletions
|
@ -132,7 +132,7 @@ class FetchResponse
|
|||
public static function isValidImapResponse(Response $oImapResponse) : bool
|
||||
{
|
||||
return
|
||||
true !== $oImapResponse->IsStatusResponse
|
||||
!$oImapResponse->IsStatusResponse
|
||||
&& Enumerations\ResponseType::UNTAGGED === $oImapResponse->ResponseType
|
||||
&& 3 < \count($oImapResponse->ResponseList) && 'FETCH' === $oImapResponse->ResponseList[2]
|
||||
&& \is_array($oImapResponse->ResponseList[3]);
|
||||
|
|
|
@ -515,6 +515,13 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
$oResponse = $this->partialParseResponse();
|
||||
$oResult->append($oResponse);
|
||||
|
||||
if ($oResponse->IsStatusResponse
|
||||
&& Enumerations\ResponseType::UNTAGGED === $oResponse->ResponseType
|
||||
&& Enumerations\ResponseStatus::PREAUTH === $oResponse->StatusOrIndex
|
||||
) {
|
||||
break;
|
||||
}
|
||||
|
||||
// RFC 5530
|
||||
if ($sEndTag === $oResponse->Tag && \is_array($oResponse->OptionalResponse) && 'CLIENTBUG' === $oResponse->OptionalResponse[0]) {
|
||||
// The server has detected a client bug.
|
||||
|
|
Loading…
Reference in a new issue