From: Agnibho Mondal Date: Thu, 11 Jan 2024 19:29:08 +0000 (+0530) Subject: Bugfix: userman password update X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=1be407d8ac37e188692ed20c286b2d11108b75a7;p=librevax.git Bugfix: userman password update --- diff --git a/userman b/userman index 4732ef5..d06b226 100755 --- a/userman +++ b/userman @@ -35,7 +35,7 @@ try: print("Updating user: "+sys.argv[2]) auth=input("Authorisation (all/none):") pwd=getpass() - pwd=bcrypt.hashpw(pwd.encode("utf-8"), bcrypt.gensalt()) + pwd=base64.b64encode(bcrypt.hashpw(pwd.encode("utf-8"), bcrypt.gensalt())) cur.execute("UPDATE users SET auth=?, hash=? WHERE user=?", (auth, pwd, sys.argv[2])) if(cur.rowcount==0): print("No record to update")