Skip to content

Reject empty array reference tokens in JSON Pointer array decoding#1037

Open
priyansx2233 wants to merge 1 commit into
DaveGamble:masterfrom
priyansx2233:fix-empty-array-token
Open

Reject empty array reference tokens in JSON Pointer array decoding#1037
priyansx2233 wants to merge 1 commit into
DaveGamble:masterfrom
priyansx2233:fix-empty-array-token

Conversation

@priyansx2233

Copy link
Copy Markdown

Fixes #1009

The JSON Pointer array index decoder currently accepts an empty
reference token and interprets it as array index 0.

This change rejects empty tokens before index parsing, ensuring
RFC 6901 compliant behavior and preventing invalid JSON Patch
operations from unintentionally modifying the first array element.

@priyansx2233

Copy link
Copy Markdown
Author

Successfully fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty array reference token is incorrectly accepted as index 0 in JSON Pointer evaluation

1 participant