Skip to content

Fix incorrect taint range assignment on JSON.stringify (fixes #345)#346

Merged
leeN merged 1 commit into
SAP:mainfrom
eleumasc:fix-345
Jan 16, 2026
Merged

Fix incorrect taint range assignment on JSON.stringify (fixes #345)#346
leeN merged 1 commit into
SAP:mainfrom
eleumasc:fix-345

Conversation

@eleumasc

@eleumasc eleumasc commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

This pull request fixes #345. Substantially, it reimplements the taint propagation logic in InfallibleQuoteJSONString (js/src/builtin/JSON.cpp). Also, it removes the use of appendTaintIfRequired and the "probably not very efficient" concern, as taint ranges are no longer added character-wise.

@leeN

leeN commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

The fix itself looks good! Could you maybe add a mochitest to verify we do not cause regressions over time?

@leeN

leeN commented Jan 16, 2026

Copy link
Copy Markdown
Collaborator

so, I'll merge this to enable moving the big rebase forward. It'd still be great if you could open a second PR with 1-2 mochitests :)

@leeN leeN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@leeN leeN merged commit b0908f7 into SAP:main Jan 16, 2026
8 of 12 checks passed
@eleumasc eleumasc mentioned this pull request Jan 17, 2026
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.

Incorrect taint range assignment on JSON.stringify

2 participants