Skip to content
Snippets Groups Projects
Unverified Commit fd26103b authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Fix empty password for provisioned account


Passwords can't just be `null` but also an empty string. The code did
not handle that properly. Now checking against `emtpy` so both `null`
and `''` trigger shortcut evaluation and prevent decrypring of an
invalid value.

Signed-off-by: default avatarChristoph Wurst <christoph@winzerhof-wurst.at>
parent 88ba5d8f
No related branches found
No related tags found
No related merge requests found
......@@ -162,9 +162,9 @@ class Manager {
try {
$account = $this->mailAccountMapper->findProvisionedAccount($user);
if ($account->getInboundPassword() !== null
if (!empty($account->getInboundPassword())
&& $this->crypto->decrypt($account->getInboundPassword()) === $password
&& $account->getOutboundPassword() !== null
&& !empty($account->getOutboundPassword())
&& $this->crypto->decrypt($account->getOutboundPassword()) === $password) {
$this->logger->debug('Password of provisioned account is up to date');
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment