mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 00:17:03 +03:00
Upgrade::ConvertInsecureAccounts use new format
This commit is contained in:
parent
9e562ac882
commit
dd662164d0
1 changed files with 14 additions and 17 deletions
|
|
@ -70,14 +70,10 @@ abstract class Upgrade
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$aNewAccounts[$sEmail] = [
|
$aNewAccounts[$sEmail] = [
|
||||||
'account',
|
'email' => $sEmail,
|
||||||
$sEmail,
|
'login' => $sEmail,
|
||||||
$sEmail, // sLogin
|
'pass' => '',
|
||||||
'', // sPassword
|
'hmac' => \hash_hmac('sha1', '', $sHash)
|
||||||
'', // sClientCert
|
|
||||||
'', // sProxyAuthUser
|
|
||||||
'', // sProxyAuthPassword
|
|
||||||
\hash_hmac('sha1', '', $sHash)
|
|
||||||
];
|
];
|
||||||
if (!$sToken) {
|
if (!$sToken) {
|
||||||
\SnappyMail\Log::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} no token");
|
\SnappyMail\Log::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} no token");
|
||||||
|
|
@ -92,16 +88,17 @@ abstract class Upgrade
|
||||||
}
|
}
|
||||||
$aAccountHash[3] = Crypt::EncryptUrlSafe($aAccountHash[3], $sHash);
|
$aAccountHash[3] = Crypt::EncryptUrlSafe($aAccountHash[3], $sHash);
|
||||||
$aNewAccounts[$sEmail] = [
|
$aNewAccounts[$sEmail] = [
|
||||||
'account',
|
'email' => $aAccountHash[1],
|
||||||
$aAccountHash[1],
|
'login' => $aAccountHash[2],
|
||||||
$aAccountHash[2],
|
'pass' => $aAccountHash[3],
|
||||||
$aAccountHash[3],
|
'hmac' => \hash_hmac('sha1', $aAccountHash[3], $sHash)
|
||||||
$aAccountHash[11],
|
|
||||||
$aAccountHash[8],
|
|
||||||
$aAccountHash[9],
|
|
||||||
$oMainAccount->Email(),
|
|
||||||
\hash_hmac('sha1', $aAccountHash[3], $sHash)
|
|
||||||
];
|
];
|
||||||
|
if ($aAccountHash[8] && $aAccountHash[9]) {
|
||||||
|
$aNewAccounts[$sEmail]['proxy'] = [
|
||||||
|
'user' => $aAccount[5],
|
||||||
|
'pass' => $aAccount[6]
|
||||||
|
];
|
||||||
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
\SnappyMail\Log::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} failed");
|
\SnappyMail\Log::warning('UPGRADE', "ConvertInsecureAccount {$sEmail} failed");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue