This commit is contained in:
djmaze 2022-01-08 11:46:35 +01:00
parent 27161cd258
commit 29fa090795
4 changed files with 6 additions and 0 deletions

View file

@ -139,6 +139,7 @@ class ImapClient extends \MailSo\Net\NetClient
$type = $this->IsSupported('LOGINDISABLED') ? '' : 'LOGIN'; // RFC3501 6.2.3 $type = $this->IsSupported('LOGINDISABLED') ? '' : 'LOGIN'; // RFC3501 6.2.3
$types = [ $types = [
// if !$encrypted: // if !$encrypted:
// 'SCRAM-SHA-512' => 1,
// 'SCRAM-SHA-256' => 1, // 'SCRAM-SHA-256' => 1,
// 'SCRAM-SHA-1' => 1, // 'SCRAM-SHA-1' => 1,
// if $encrypted: // if $encrypted:

View file

@ -111,8 +111,11 @@ class ManageSieveClient extends \MailSo\Net\NetClient
// $encrypted = !empty(\stream_get_meta_data($this->ConnectionResource())['crypto']); // $encrypted = !empty(\stream_get_meta_data($this->ConnectionResource())['crypto']);
$type = ''; $type = '';
$types = [ $types = [
// if !$encrypted:
// 'SCRAM-SHA-512' => 1, // !$encrypted
// 'SCRAM-SHA-256' => 1, // !$encrypted // 'SCRAM-SHA-256' => 1, // !$encrypted
// 'SCRAM-SHA-1' => 1, // !$encrypted // 'SCRAM-SHA-1' => 1, // !$encrypted
// if $encrypted:
// 'CRAM-MD5' => 1, // $encrypted // 'CRAM-MD5' => 1, // $encrypted
'OAUTHBEARER' => $aCredentials['UseAuthOAuth2IfSupported'], 'OAUTHBEARER' => $aCredentials['UseAuthOAuth2IfSupported'],
'XOAUTH2' => $aCredentials['UseAuthOAuth2IfSupported'], 'XOAUTH2' => $aCredentials['UseAuthOAuth2IfSupported'],

View file

@ -126,6 +126,7 @@ class SmtpClient extends \MailSo\Net\NetClient
$type = ''; $type = '';
$types = [ $types = [
// if !$encrypted: // if !$encrypted:
'SCRAM-SHA-512' => 1,
'SCRAM-SHA-256' => 1, 'SCRAM-SHA-256' => 1,
'SCRAM-SHA-1' => 1, 'SCRAM-SHA-1' => 1,
// if $encrypted: // if $encrypted:

View file

@ -21,6 +21,7 @@ class Scram extends \SnappyMail\SASL
function __construct(string $algo) function __construct(string $algo)
{ {
if (\stripos($algo, '-PLUS')) { if (\stripos($algo, '-PLUS')) {
// https://github.com/the-djmaze/snappymail/issues/182
throw new \Exception("SASL SCRAM channel binding unsupported: {$algo}"); throw new \Exception("SASL SCRAM channel binding unsupported: {$algo}");
} }
$algo = \str_replace('sha-', 'sha', \strtolower($algo)); $algo = \str_replace('sha-', 'sha', \strtolower($algo));