mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 21:46:00 -03:30
LDAP setting fields validation updates.
This commit is contained in:
@@ -32,7 +32,8 @@ def validate_ldap_dn_with_user(value):
|
||||
|
||||
|
||||
def validate_ldap_bind_dn(value):
|
||||
if not re.match(r'^[A-Za-z][A-Za-z0-9._-]*?\\[A-Za-z0-9 ._-]+?$', value.strip()):
|
||||
if not re.match(r'^[A-Za-z][A-Za-z0-9._-]*?\\[A-Za-z0-9 ._-]+?$', value.strip()) and \
|
||||
not re.match(r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$', value.strip()):
|
||||
validate_ldap_dn(value)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user