mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
properly encode LDAP DN values on validation
see: https://github.com/ansible/ansible-tower/issues/7554
This commit is contained in:
parent
91ec0a4482
commit
7a21a45781
@ -22,7 +22,7 @@ def validate_ldap_dn(value, with_user=False):
|
||||
else:
|
||||
dn_value = value
|
||||
try:
|
||||
ldap.dn.str2dn(dn_value)
|
||||
ldap.dn.str2dn(dn_value.encode('utf-8'))
|
||||
except ldap.DECODING_ERROR:
|
||||
raise ValidationError(_('Invalid DN: %s') % value)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user