1
0
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:
Ryan Petrello 2017-09-21 09:54:57 -04:00 committed by Matthew Jones
commit d24166bd68

View File

@ -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)