From fad4dea1c55590b26cdd13dc2cf5dc327ca77cc2 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 1 Jul 2024 21:24:21 +0200 Subject: [PATCH] Resolve #1647 --- plugins/login-external/index.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/login-external/index.php b/plugins/login-external/index.php index 001b11a9c..9929d5b2e 100644 --- a/plugins/login-external/index.php +++ b/plugins/login-external/index.php @@ -6,8 +6,8 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin NAME = 'Login External', AUTHOR = 'SnappyMail', URL = 'https://snappymail.eu/', - VERSION = '1.3', - RELEASE = '2024-03-27', + VERSION = '1.4', + RELEASE = '2024-07-01', REQUIRED = '2.36.1', CATEGORY = 'Login', LICENSE = 'MIT', @@ -31,9 +31,12 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin try { - $oAccount = $oActions->LoginProcess($sEmail, $sPassword); + // Convert password to SensitiveString type + $oPassword = new \SnappyMail\SensitiveString($sPassword); + $oAccount = $oActions->LoginProcess($sEmail, $oPassword); if (!$oAccount instanceof \RainLoop\Model\MainAccount) { $oAccount = null; + \SnappyMail\LOG::info(\get_class($this), 'LoginProcess failed'); } } catch (\Throwable $oException) @@ -53,7 +56,7 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin if ($oException instanceof \RainLoop\Exceptions\ClientException) { $aResult['ErrorCode'] = $oException->getCode(); } else { - $aResult['ErrorCode'] = Notifications::AuthError; + $aResult['ErrorCode'] = \RainLoop\Notifications::AuthError; } } echo \json_encode($aResult);