Production deployments run with PASSWORD_HASHERS=[MD5PasswordHasher] due to overly broad test override #1094
Unanswered
mgradalska
asked this question in
Q&A
Replies: 2 comments
-
|
Opened a PR: #1096 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks @mgradalska, good catch — and for tracing it to the venv path matching the predicate. This is a bad one: prod silently storing MD5 and locking out PBKDF2 users on upgrade. Queuing #1096 for review and merge, and we will get a patch out. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
A condition in
karrio/server/settings/base.pyintended to switch to a fast MD5 hasher only during the test suite fires for every normal runtime invocation as well, because its second predicate matches the install path of thekarriovirtualenv rather than the test invocation.As a result, every production deployment that uses the official
karrio/serverimage runs withPASSWORD_HASHERS = ["MD5PasswordHasher"]only. Two practical consequences:karrio createsuperuser, and any user signed up through the dashboard. MD5 is broken as a password hash and unsafe for storing credentials.The override was introduced in
2026.1.22as part of a test-suite-perf change (perf(tests+ci): test suite speed improvements and CI optimisation), and is still present onmain/2026.1.31. The changelog doesn't flag it as a breaking change. The comment next to the code claims "production is unaffected", which is what made this hard to spot.Reproducing
With the upstream image
karrio/server:2026.1.31:For the upgrade lock-out scenario (the original cause of this report):
pbkdf2_sha256$1200000$....AuthenticationFailed: No active account found with the given credentials, which is misleading - the user IS active and the password IS correct; only PBKDF2 hashes can't be verified, because no PBKDF2 hasher is loaded.karrio createsuperuser. Login succeeds with the new credentials. Inspecting the DB, the new user'spasswordcolumn containsmd5$<salt>$<hash>.Beta Was this translation helpful? Give feedback.
All reactions