summaryrefslogtreecommitdiff
path: root/python/samba/samdb.py
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-02-13 22:34:06 +0100
committerRalph Boehme <slow@samba.org>2017-02-21 16:09:22 +0100
commitb86c29b1e6fb2fb4cf203aa38c7764084d855730 (patch)
treef079ab0f34d50fb9a1b5991297a8614069a79921 /python/samba/samdb.py
parent99b8d6beccf4d3d24f9d87a4d8e5eadfe0e0dd33 (diff)
downloadsamba-b86c29b1e6fb2fb4cf203aa38c7764084d855730.tar.gz
python/samba: use an explicit .encode('utf-8') where we expect utf8 passwords
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'python/samba/samdb.py')
-rw-r--r--python/samba/samdb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/samba/samdb.py b/python/samba/samdb.py
index eabe363aac9..19dd8e9a6ad 100644
--- a/python/samba/samdb.py
+++ b/python/samba/samdb.py
@@ -503,7 +503,7 @@ member: %s
if len(res) > 1:
raise Exception('Matched %u multiple users with filter "%s"' % (len(res), search_filter))
user_dn = res[0].dn
- pw = unicode('"' + password + '"', 'utf-8').encode('utf-16-le')
+ pw = unicode('"' + password.encode('utf-8') + '"', 'utf-8').encode('utf-16-le')
setpw = """
dn: %s
changetype: modify