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

Mira Limbeck m.limbeck at proxmox.com
Wed Apr 10 12:15:53 CEST 2019


On 4/10/19 12:04 PM, Thomas Lamprecht wrote:
> On 4/10/19 10:40 AM, Mira Limbeck wrote:
>> 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',
> why not delete the above line completely? "pmg-email-address" is already specified
> to be a string in it's initial definition.
You're right, will change that.
>>       optional => 1,
>> -};
>> +});
>>   
>>   __PACKAGE__->register_method ({
>>       name => 'index',
>>



More information about the pmg-devel mailing list