[pmg-devel] [PATCH pmg-api] fix #2153: allow "'" in quarantine email addresses

Mira Limbeck m.limbeck at proxmox.com
Wed Apr 10 10:40:04 CEST 2019


use the more relaxed standard option 'pmg-email-address' defined in
PMG/Utils.pm instead of the 'email' format defined in pve-common for
quarantine.

Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
---
should this be done in other places as well?

 PMG/API2/Quarantine.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PMG/API2/Quarantine.pm b/PMG/API2/Quarantine.pm
index 158247b..3b3410f 100644
--- a/PMG/API2/Quarantine.pm
+++ b/PMG/API2/Quarantine.pm
@@ -151,11 +151,11 @@ my $parse_header_info = sub {
     return $res;
 };
 
-my $pmail_param_type = {
+my $pmail_param_type = get_standard_option('pmg-email-address', {
     description => "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.",
-    type => 'string', format => 'email',
+    type => 'string',
     optional => 1,
-};
+});
 
 __PACKAGE__->register_method ({
     name => 'index',
-- 
2.11.0




More information about the pmg-devel mailing list