Disabling static strings during StringBuffer conversion#296
Conversation
|
Can we meaningfully taint empty strings? TryEmptyOrStaticString says they are super common, so maybe the "cleaner" way would be to change the logic here and only remove the static string lookup for non empty strings? or to move the following check over: if (n == 0) {
return cx->emptyString();
} |
Good idea, I just checked and all of the TryEmptyOrStaticString are now commented out by us! So I think the best strategy is to re-enable them, and disable the static string part centrally in TryEmptyOrStaticString itself. |
|
Something like this? ☝️ |
This patch disables static string creation during StringBuffer to JSString conversions, in order to ensure taint information does not get lost. As such this fixes #290.
Also adding more tests which reproduce this issue to prevent regression.