]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python: Convert base64 encoded password to utf-8
authorAndreas Schneider <asn@samba.org>
Tue, 30 Jan 2018 17:09:00 +0000 (18:09 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 14 Feb 2018 23:18:28 +0000 (00:18 +0100)
Pair-Programmed-With: Alexander Bokovoy <ab@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/samdb.py

index 7f52a5e56f8d003974be69e95c1ba35eab3b5161..abc7e188853b328fbf2eab0fbb8323ae6c7c354c 100644 (file)
@@ -515,7 +515,7 @@ dn: %s
 changetype: modify
 replace: unicodePwd
 unicodePwd:: %s
-""" % (user_dn, base64.b64encode(pw))
+""" % (user_dn, base64.b64encode(pw).decode('utf-8'))
 
             self.modify_ldif(setpw)