mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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
|
public static function isValidImapResponse(Response $oImapResponse) : bool
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
true !== $oImapResponse->IsStatusResponse
|
!$oImapResponse->IsStatusResponse
|
||||||
&& Enumerations\ResponseType::UNTAGGED === $oImapResponse->ResponseType
|
&& Enumerations\ResponseType::UNTAGGED === $oImapResponse->ResponseType
|
||||||
&& 3 < \count($oImapResponse->ResponseList) && 'FETCH' === $oImapResponse->ResponseList[2]
|
&& 3 < \count($oImapResponse->ResponseList) && 'FETCH' === $oImapResponse->ResponseList[2]
|
||||||
&& \is_array($oImapResponse->ResponseList[3]);
|
&& \is_array($oImapResponse->ResponseList[3]);
|
||||||
|
|
|
||||||
|
|
@ -515,6 +515,13 @@ class ImapClient extends \MailSo\Net\NetClient
|
||||||
$oResponse = $this->partialParseResponse();
|
$oResponse = $this->partialParseResponse();
|
||||||
$oResult->append($oResponse);
|
$oResult->append($oResponse);
|
||||||
|
|
||||||
|
if ($oResponse->IsStatusResponse
|
||||||
|
&& Enumerations\ResponseType::UNTAGGED === $oResponse->ResponseType
|
||||||
|
&& Enumerations\ResponseStatus::PREAUTH === $oResponse->StatusOrIndex
|
||||||
|
) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// RFC 5530
|
// RFC 5530
|
||||||
if ($sEndTag === $oResponse->Tag && \is_array($oResponse->OptionalResponse) && 'CLIENTBUG' === $oResponse->OptionalResponse[0]) {
|
if ($sEndTag === $oResponse->Tag && \is_array($oResponse->OptionalResponse) && 'CLIENTBUG' === $oResponse->OptionalResponse[0]) {
|
||||||
// The server has detected a client bug.
|
// The server has detected a client bug.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue