Fix regexp patterns in parameters to not enforce length

Regexp should not enforce lenght of string, we have different checks for
that. Secondly regexp with length specified produces an incorrect error
message.

https://fedorahosted.org/freeipa/ticket/5822

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Martin Basti
2016-09-14 12:55:01 +02:00
committed by Martin Babinsky
parent 2bc70a5d5f
commit 3720080611
5 changed files with 7 additions and 7 deletions

View File

@@ -260,7 +260,7 @@ class group(LDAPObject):
takes_params = (
Str('cn',
pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$',
pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$',
pattern_errmsg='may only include letters, numbers, _, -, . and $',
maxlength=255,
cli_name='group_name',