From 06a08d81e53607e47baf9e1e5555f7861890ea97 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Tue, 3 Dec 2019 15:05:36 +0100
Subject: [PATCH] - added missing allow domain only for previous commit

---
 server/plugins-available/rspamd_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php
index cfb0979eb5..212cb2c21c 100644
--- a/server/plugins-available/rspamd_plugin.inc.php
+++ b/server/plugins-available/rspamd_plugin.inc.php
@@ -68,7 +68,7 @@ class rspamd_plugin {
 			return false; // invalid character
 		} elseif(strpos($domain, '..') !== false) {
 			return false; // two dots not allowed
-		} elseif(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\", "", $local))) {
+		} elseif($local && !preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\", "", $local))) {
 			// character not valid in local part unless
 			// local part is quoted
 			if(!preg_match('/^"(\\\\"|[^"])+"$/', str_replace("\\\\", "", $local))) {
-- 
GitLab