Repository navigation
Conversation
Signed-off-by: Nirmal Khedkar <nirmalhk7@gmail.com>
nirmalhk7
marked this pull request as ready for review
November 5, 2026 00:34
Contributor
Author
|
As I understand, superseded by #197, hence closing. |
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.
POST /users accepted a caller-selected account ID and issued an unconditional DynamoDB PutItem, allowing creation to replace an existing account record. Generate the account ID server-side, make creation conditional on attribute_not_exists(id), and return HTTP 409 if a generated ID already exists. Existing role handling and authentication behavior are unchanged; this fix does not claim working login takeover or introduce a new role policy.
Regressions verify that a caller-selected victim ID leaves the existing record intact, successful creation returns the server-generated ID, and a generated-ID collision returns 409 without replacing the original record.
Validation: the three affected route cases failed before the fix and all 5 targeted user-route Jest tests pass afterward, using real Express, Supertest, and bcrypt with simulated DynamoDB conditional writes. Tests ran from an isolated backend copy using existing installed dependencies because origin/main tracks dependency stubs. The existing Node suite also passes all 6 tests; whitespace and syntax checks pass. No live DynamoDB or production verification performed. One DCO-signed commit, based independently on origin/main.