From 2786a23fb0ac47c520cc717d5fc5426b7c89e013 Mon Sep 17 00:00:00 2001 From: campbell-m <87438215+campbell-m@users.noreply.github.com> Date: Sun, 3 Sep 2023 10:44:40 +0100 Subject: [PATCH] Simplify code --- web/lib/MRBS/Auth/AuthPop3.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/lib/MRBS/Auth/AuthPop3.php b/web/lib/MRBS/Auth/AuthPop3.php index 615b4ff927..2c7a4c2c30 100644 --- a/web/lib/MRBS/Auth/AuthPop3.php +++ b/web/lib/MRBS/Auth/AuthPop3.php @@ -41,8 +41,6 @@ public function validateUser( { global $pop3_host, $pop3_port; - $match = array(); - $shared_secret = ''; $all_pop3_hosts = array(); $all_pop3_ports = array(); @@ -114,7 +112,7 @@ public function validateUser( } // If we have a shared secret then try APOP - if ($shared_secret) + if (isset($shared_secret) && ($shared_secret !== '')) { $md5_token = md5("$shared_secret$pass"); $auth_string = "APOP $user $md5_token\r\n";