1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-12 04:59:09 +03:00

use a base64 encoded password when changing passwords

This avoids problems with embedded control characters in password
changes
This commit is contained in:
Andrew Tridgell
2009-03-12 15:20:25 +11:00
parent 0770028cbe
commit 483525f73c

View File

@ -28,6 +28,7 @@ import ldb
from samba.idmap import IDmapDB
import pwd
import time
import base64
__docformat__ = "restructuredText"
@ -178,8 +179,8 @@ userAccountControl: %u
dn: %s
changetype: modify
replace: userPassword
userPassword: %s
""" % (user_dn, password)
userPassword:: %s
""" % (user_dn, base64.b64encode(password))
self.modify_ldif(setpw)