From 0064d59855bc746936fdf84275cf8e2c39eb8f00 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Thu, 9 Mar 2017 09:46:53 +0100 Subject: [PATCH] - strip @ sign on global black/whitelist for domains --- interface/web/mail/mail_blacklist_edit.php | 2 ++ interface/web/mail/mail_whitelist_edit.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/interface/web/mail/mail_blacklist_edit.php b/interface/web/mail/mail_blacklist_edit.php index b4a2a22693..f7e2d15e3f 100644 --- a/interface/web/mail/mail_blacklist_edit.php +++ b/interface/web/mail/mail_blacklist_edit.php @@ -86,6 +86,8 @@ class page_action extends tform_actions { function onSubmit() { global $app, $conf; + if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1); + // Check the client limits, if user is not the admin if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin // Get the limits of the client diff --git a/interface/web/mail/mail_whitelist_edit.php b/interface/web/mail/mail_whitelist_edit.php index 4bec041990..9bb04fab7a 100644 --- a/interface/web/mail/mail_whitelist_edit.php +++ b/interface/web/mail/mail_whitelist_edit.php @@ -85,6 +85,8 @@ class page_action extends tform_actions { function onSubmit() { global $app, $conf; + if(substr($this->dataRecord['source'], 0, 1) === '@') $this->dataRecord['source'] = substr($this->dataRecord['source'], 1); + // Check the client limits, if user is not the admin if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin // Get the limits of the client -- GitLab