Changes between Version 7 and Version 8 of UserGuidelines/Admin/UserManagement


Ignore:
Timestamp:
02/05/22 14:50:31 (2 years ago)
Author:
Fran Boon
Comment:

Update CLI password reset for Py3

Legend:

Unmodified
Added
Removed
Modified
  • UserGuidelines/Admin/UserManagement

    v7 v8  
    3636alg = hashlib.sha512
    3737hmac_key = auth.settings.hmac_key
    38 password = hmac.new(hmac_key, "newpassword", alg).hexdigest()
     38password = hmac.new(hmac_key.encode("utf-8"), "newpassword".encode("utf-8"), alg).hexdigest()
    3939table = db.auth_user
    4040db(table.email == "myemail@domain.com").update(password = password)