anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: spritelink/nipap
Issue: No way to change user password 

Although the issue #871 is marked as closed (solved?), there is still no way to change password:

```
nipap-passwd modify -u user -p 'test1'
no such column: password
```


Changed files:
nipap/nipap/authlib.py

diff --git a/nipap/nipap/authlib.py b/nipap/nipap/authlib.py
index 50d90bf4..9efa6b03 100644
--- a/nipap/nipap/authlib.py
+++ b/nipap/nipap/authlib.py
@@ -669,6 +669,13 @@ class SqliteAuth(BaseAuth):
             Since username is used as primary key and we only have a single
             argument for it we can't modify the username right now.
         """
+        if 'password' in data:
+            # generate salt
+            char_set = string.ascii_letters + string.digits
+            data['pwd_salt'] = ''.join(random.choice(char_set) for x in range(8))
+            data['pwd_hash'] = self._gen_hash(data['password'], data['pwd_salt'])
+            del(data['password'])
+
         sql = "UPDATE user SET "
         sql += ', '.join("%s = ?" % k for k in sorted(data))
         sql += " WHERE username = ?"