Skip to content

Conversation

jonasbardino
Copy link
Contributor

@jonasbardino jonasbardino commented Oct 6, 2025

Rework password checks in account renewal to rely on check_hash / check_scramble calls in the recently introduced early_validation_checks during account request submission where original password is still available.

Fix a use of load_account_dict using configuration where logger is expected.

Add unit tests to cover a number of early_validation_checks cases.
NOTE: there are still a few tests pending improvements marked with TODO e.g. to better test account access renewal with legal and illegal password change. Tagged the PR with follow-up as we want the fix to land ASAP and the included unit tests are sufficient along with practical deployment tests.

@jonasbardino jonasbardino self-assigned this Oct 6, 2025
@jonasbardino jonasbardino added the bug Something isn't working label Oct 6, 2025
@jonasbardino jonasbardino marked this pull request as ready for review October 6, 2025 17:21
@jonasbardino jonasbardino force-pushed the fix/failed-password-hash-verification-during-account-renew branch from f534171 to 2b5785a Compare October 8, 2025 14:07
@jonasbardino
Copy link
Contributor Author

Currently fails CI due to the unrelated #353.

@jonasbardino jonasbardino changed the title WiP: rework password checks in account renewal to rely on early_validation_checks Rework password checks in account renewal to rely on early_validation_checks Oct 8, 2025
@jonasbardino jonasbardino requested a review from a team October 8, 2025 14:56
@jonasbardino jonasbardino force-pushed the fix/failed-password-hash-verification-during-account-renew branch from 2b5785a to fa4b842 Compare October 8, 2025 14:58
@jonasbardino jonasbardino added the follow-up pending Pending tasks to follow-up on after close label Oct 8, 2025
Copy link
Contributor

@Martin-Rehr Martin-Rehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

…ck_scramble

calls in the recently introduced early_validation_checks during account request
submission where original password is still available.

Fix a use of load_account_dict using configuration where logger is expected.

Add unit tests to cover a number of early_validation_checks cases. Still more
tests pending e.g. to test renewal with legal and illegal password change.
…dvertently

inverted. Rename var to pw_match for consistence.

Fix string corruption in pickled MiG-user.db fixture file to allow proper use
of password_hash values.

Refactor the accountreq unit test module to split into peers testing and filter
testing with shared init of users in the latter, too. Relies on the pickled
user db from fixtures now. Add test coverage on account renewal for pw check
and ID collision.

Still acouple of TODOs with test coverage of suspended accounts and the
a password to match the pickled hash.
…id_user_dn

to make lint happy. Not a new issue but makes sense and adds consistence with
other functions using it.
@jonasbardino jonasbardino force-pushed the fix/failed-password-hash-verification-during-account-renew branch from fa4b842 to fe627b2 Compare October 10, 2025 07:29
@jonasbardino jonasbardino merged commit f076b55 into next Oct 10, 2025
6 of 7 checks passed
@jonasbardino jonasbardino deleted the fix/failed-password-hash-verification-during-account-renew branch October 10, 2025 15:29
@jonasbardino jonasbardino added follow-up pending Pending tasks to follow-up on after close and removed follow-up pending Pending tasks to follow-up on after close labels Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working follow-up pending Pending tasks to follow-up on after close

Projects

None yet

Development

Successfully merging this pull request may close these issues.

External account renewal can incorrectly report wrong password due to random seed difference and hash comparison

2 participants