Cleanup SMTP auth handling

This commit is contained in:
the-djmaze 2024-03-25 19:36:39 +01:00
parent 55642e826e
commit c1e25dedb9
3 changed files with 3 additions and 8 deletions

View file

@ -106,7 +106,6 @@ trait UserAuth
}
$this->Plugins()->RunHook('login.credentials', array(&$sEmail, &$sLogin, &$sPassword));
$this->logMask($sPassword);
$oPassword->setValue($sPassword);
}

View file

@ -70,12 +70,9 @@ abstract class Account implements \JsonSerializable
$this->oPassword = $oPassword;
}
public function SetSmtpPassword(
#[\SensitiveParameter]
string $sPassword
) : void
public function SetSmtpPassword(SensitiveString $oPassword) : void
{
$this->oSmtpPassword = new SensitiveString($sPassword);
$this->oSmtpPassword = $oPassword;
}
#[\ReturnTypeWillChange]
@ -169,7 +166,7 @@ abstract class Account implements \JsonSerializable
// init smtp user/password
if (isset($aAccountHash['smtp'])) {
$oAccount->sSmtpLogin = $aAccountHash['smtp']['user'];
$oAccount->SetSmtpPassword($aAccountHash['smtp']['pass']);
$oAccount->SetSmtpPassword(new SensitiveString($aAccountHash['smtp']['pass']));
}
}
}

View file

@ -61,7 +61,6 @@
}
}"></div>
<span style="opacity:0.7"> (user@example.com → user)</span>
<span style="opacity:0.7"> (user@example.com → user)</span>
<br>
<div style="display: inline-block;" data-bind="component: {
name: 'Checkbox',