mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add regular expression pattern to host names.
Limit hostnames to letters, digits and - with a maximum length of 255 https://fedorahosted.org/freeipa/ticket/1780
This commit is contained in:
committed by
Martin Kosek
parent
2be04c6e7f
commit
a27a820221
@@ -247,6 +247,9 @@ class host(LDAPObject):
|
||||
|
||||
takes_params = (
|
||||
Str('fqdn', validate_host,
|
||||
pattern='^[a-zA-Z0-9][a-zA-Z0-9-\.]{0,254}$',
|
||||
pattern_errmsg='may only include letters, numbers, and -',
|
||||
maxlength=255,
|
||||
cli_name='hostname',
|
||||
label=_('Host name'),
|
||||
primary_key=True,
|
||||
|
||||
Reference in New Issue
Block a user