-
Notifications
You must be signed in to change notification settings - Fork 594
fix(server): handle unset password hash version in user profile #4259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ec48ef7 to
baf96fd
Compare
When the password hashing version is not set, then the default one is used, so verifying the password works.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4259 +/- ##
==========================================
+ Coverage 75.86% 75.97% +0.11%
==========================================
Files 470 507 +37
Lines 37301 38913 +1612
==========================================
+ Hits 28299 29566 +1267
- Misses 7071 7380 +309
- Partials 1931 1967 +36 ☔ View full report in Codecov by Sentry. |
| t.Errorf("invalid authenticator result for %v/%v: %v, want %v", username, password, got, want) | ||
| } | ||
| got := a.IsValid(ctx, r, username, password) | ||
| assert.Equal(t, want, got, "invalid authenticator result for %v/%v", username, password) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/assert/require/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, assert makes sense here so other test cases are checked as well.
There is no reason to stop the test when this check fails.
Fixes