diff options
| author | Martin Basti <mbasti@redhat.com> | 2017-01-11 13:03:53 +0100 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2017-01-24 13:25:47 +0100 |
| commit | 746d4ffc583a847834a592150644fa4270486c89 (patch) | |
| tree | 4dbbfc30fdfc2c13cc219fc1f3b3457c43a741f6 /ipapython | |
| parent | 4b148c8ca3d022020fa6caccf02729c090c8dbcb (diff) | |
| download | freeipa-746d4ffc583a847834a592150644fa4270486c89.tar.gz freeipa-746d4ffc583a847834a592150644fa4270486c89.tar.xz freeipa-746d4ffc583a847834a592150644fa4270486c89.zip | |
py3: make_filter_from_attr: use string instead of bytes
Method escape_filter_chars() requires string as parameter instead of
bytes. 'value_to_utf8' returns bytes thus this code has to be removed.
https://fedorahosted.org/freeipa/ticket/4985
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipapython')
| -rw-r--r-- | ipapython/ipaldap.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py index 57f7dc1cb..81d8c8dd5 100644 --- a/ipapython/ipaldap.py +++ b/ipapython/ipaldap.py @@ -1252,8 +1252,9 @@ class LDAPClient(object): value = u'\\'.join( value[i:i+2] for i in six.moves.range(-2, len(value), 2)) else: - value = value_to_utf8(value) + value = six.text_type(value) value = ldap.filter.escape_filter_chars(value) + if not exact: template = '%s' if leading_wildcard: |
