From 9eec07fb0c3624011522048e09715cebe851deff Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 18 Feb 2019 17:12:10 +0100 Subject: [PATCH] improve pmg-email-address regex the '|' is not necessary since the first option is empty (mitigated by the minLength of 3) and add the '\' to forbidden characters since they make problems with browser requests (browsers convert '\' to '/') Signed-off-by: Dominik Csapak --- PMG/Utils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PMG/Utils.pm b/PMG/Utils.pm index 26c0921..60fdc5e 100644 --- a/PMG/Utils.pm +++ b/PMG/Utils.pm @@ -108,7 +108,7 @@ PVE::JSONSchema::register_standard_option('username', { PVE::JSONSchema::register_standard_option('pmg-email-address', { description => "Email Address (allow most characters).", type => 'string', - pattern => '(?:|[^\s\/\@]+\@[^\s\/\@]+)', + pattern => '(?:[^\s\/\\\@]+\@[^\s\/\\\@]+)', maxLength => 512, minLength => 3, }); -- 2.39.2