fix(post): send current_password when replacing an issued password - #198
Merged
Merged
Conversation
The engine's own-password change has required current_password since v1.22.11 (engine #667) and answers 422 without it, so make post failed its forced-change login against every engine from that release on. post now sends the password it just logged in with. The test fake refuses a change with no current_password, or a wrong one, the way the engine does, so the drift cannot pass silently again.
A request validation error echoes the submitted body, and the body now carries current_password beside new_password. Both are masked before the fault text reaches stderr; a test feeds back the whole body and asserts neither value prints.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make post breaks against every engine from v1.22.11 on. The engine's own-password change has required current_password since engine #667, and post only sent new_password, so its forced-change login got a 422.
post now sends the password it just logged in with. The test fake used to accept the change with no current_password, which is how this got past the suite: it now refuses a missing one with 422 and a wrong one with 403, the same as the engine (accounts.py:682-691).
Proof: make check-tests 768 passed, make check-python clean.