mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
logMask all AUTHENTICATE requests
This commit is contained in:
parent
f745a54669
commit
b6df50546e
2 changed files with 13 additions and 4 deletions
|
|
@ -164,6 +164,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
$this->sendRaw($sAuth);
|
||||
}
|
||||
$oResponse = $this->getResponse();
|
||||
// if ($oResponse->getLast()->ResponseType === Enumerations\ResponseType::CONTINUATION)
|
||||
if ($SASL->hasChallenge()) {
|
||||
$sChallenge = $SASL->challenge($this->getResponseValue($oResponse, Enumerations\ResponseType::CONTINUATION));
|
||||
$this->logMask($sChallenge);
|
||||
|
|
@ -192,7 +193,9 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
{
|
||||
$oResponse = $this->SendRequestGetResponse('AUTHENTICATE', array($type));
|
||||
$sB64 = $this->getResponseValue($oResponse, Enumerations\ResponseType::CONTINUATION);
|
||||
$this->sendRaw($SASL->authenticate($sLogin, $sPassword, $sB64), true);
|
||||
$sAuth = $SASL->authenticate($sLogin, $sPassword, $sB64);
|
||||
$this->logMask($sAuth);
|
||||
$this->sendRaw($sAuth, true);
|
||||
$this->getResponse();
|
||||
$sPass = $SASL->challenge(''/*UGFzc3dvcmQ6*/);
|
||||
$this->logMask($sPass);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,9 @@ class SmtpClient extends \MailSo\Net\NetClient
|
|||
// https://github.com/the-djmaze/snappymail/issues/1038
|
||||
try
|
||||
{
|
||||
$sResult = $this->sendRequestWithCheck('AUTH PLAIN ' . $SASL->authenticate($sLogin, $sPassword), 235);
|
||||
$sRequest = $SASL->authenticate($sLogin, $sPassword);
|
||||
$this->logMask($sRequest);
|
||||
$sResult = $this->sendRequestWithCheck('AUTH PLAIN ' . $sRequest, 235);
|
||||
}
|
||||
catch (\MailSo\Smtp\Exceptions\NegativeResponseException $oException)
|
||||
{
|
||||
|
|
@ -179,7 +181,9 @@ class SmtpClient extends \MailSo\Net\NetClient
|
|||
$sRequest = '';
|
||||
if (\str_starts_with($type, 'SCRAM-')) {
|
||||
// RFC 5802
|
||||
$sResult = $this->sendRequestWithCheck($SASL->authenticate($sLogin, $sPassword, $sResult), 234);
|
||||
$sRequest = $SASL->authenticate($sLogin, $sPassword, $sResult);
|
||||
$this->logMask($sRequest);
|
||||
$sResult = $this->sendRequestWithCheck($sRequest, 234);
|
||||
$sRequest = $SASL->challenge($sResult);
|
||||
} else switch ($type) {
|
||||
// RFC 4616
|
||||
|
|
@ -190,7 +194,9 @@ class SmtpClient extends \MailSo\Net\NetClient
|
|||
break;
|
||||
|
||||
case 'LOGIN':
|
||||
$sResult = $this->sendRequestWithCheck($SASL->authenticate($sLogin, $sPassword, $sResult), 334);
|
||||
$sRequest = $SASL->authenticate($sLogin, $sPassword, $sResult);
|
||||
$this->logMask($sRequest);
|
||||
$sResult = $this->sendRequestWithCheck($sRequest, 334);
|
||||
$sRequest = $SASL->challenge($sResult);
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue