mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Merge pull request #442 from ryanpetrello/fix-7554
properly encode LDAP DN values on validation
This commit is contained in:
commit
d24166bd68
@ -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