🥅 Workaround for faulty argon2 hashes on aarch64 (#4780)

Ensure we can successfully verify an argon2 hash before using it.

Closes #4779
This commit is contained in:
Christopher Perrin authored and GitHub committed 2023-03-29 13:32:15 +02:00
1 parent 44e38f0fcd
commit df60defca7
3 files changed
+16 -1

No files matched your search

+14
View File
@@ -21,3 +21,17 @@ class UserManagerTest(unittest.TestCase):
# should not throw an exception
octoprint.access.users.UserManager.create_password_hash(password)
def test_createPasswordHash_is_valid(self):
password = "test1234"
password_hash = octoprint.access.users.UserManager.create_password_hash(password)
user = octoprint.access.users.User(
"username",
password_hash,
True,
permissions=[],
apikey="apikey",
settings={"key": "value"},
)
self.assertTrue(user.check_password(password))