fixed bug,dass passwörter nicht mit log auftauchen
This commit is contained in:
parent
0d04bcbce5
commit
d474ef49e8
|
@ -170,7 +170,7 @@ class LDAPController(metaclass=Singleton):
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def modifyUser(self, user, conn, attributes):
|
def modifyUser(self, user, conn, attributes):
|
||||||
debug.info("modify ldap data from user {{ {} }} with attributes {{ {} }}".format(user, attributes))
|
debug.info("modify ldap data from user {{ {} }} with attributes (can't show because here can be a password)".format(user))
|
||||||
try:
|
try:
|
||||||
if 'username' in attributes:
|
if 'username' in attributes:
|
||||||
debug.debug("change username")
|
debug.debug("change username")
|
||||||
|
@ -191,7 +191,7 @@ class LDAPController(metaclass=Singleton):
|
||||||
if 'password' in attributes:
|
if 'password' in attributes:
|
||||||
salted_password = hashed(HASHED_SALTED_MD5, attributes['password'])
|
salted_password = hashed(HASHED_SALTED_MD5, attributes['password'])
|
||||||
mody['userPassword'] = [(MODIFY_REPLACE, [salted_password])]
|
mody['userPassword'] = [(MODIFY_REPLACE, [salted_password])]
|
||||||
debug.debug("modyfier are {{ {} }}".format(mody))
|
debug.debug("modyfier are (can't show because here can be a password)")
|
||||||
conn.modify(user.dn, mody)
|
conn.modify(user.dn, mody)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
debug.warning("exception in modify user data from ldap", exc_info=True)
|
debug.warning("exception in modify user data from ldap", exc_info=True)
|
||||||
|
|
|
@ -126,8 +126,8 @@ class Base:
|
||||||
return user
|
return user
|
||||||
|
|
||||||
def modifyUser(self, user, attributes, password):
|
def modifyUser(self, user, attributes, password):
|
||||||
debug.info("modify user {{ {} }} with attributes {{ {} }}".format(
|
debug.info("modify user {{ {} }} with attributes (can't show because here can be a password)".format(
|
||||||
user, attributes))
|
user))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ldap_conn = ldap.bind(user, password)
|
ldap_conn = ldap.bind(user, password)
|
||||||
|
|
Loading…
Reference in New Issue