mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 08:57:03 +03:00
SHA-512 #182
This commit is contained in:
parent
27161cd258
commit
29fa090795
4 changed files with 6 additions and 0 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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'],
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue