Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: escape strings in v8::CpuProfile::Serialize #60

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

santigimeno
Copy link
Member

@santigimeno santigimeno commented Jan 8, 2024

Make sure the url field is escaped to avoid generating invalid JSON.

@santigimeno santigimeno self-assigned this Jan 8, 2024
@santigimeno santigimeno force-pushed the santi/fix_v8_serializer branch 2 times, most recently from fc21515 to 4bd618c Compare January 8, 2024 21:55
Copy link
Contributor

@juanarbol juanarbol left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@trevnorris
Copy link
Contributor

@santigimeno The function EscapeAndAppendString() only needs to run on Windows builds right? Maybe use an #ifdef to noop for other builds.

@santigimeno
Copy link
Member Author

@santigimeno The function EscapeAndAppendString() only needs to run on Windows builds right? Maybe use an #ifdef to noop for other builds.

I think this can also affect other OS's. For example:

[/tmp]$ cat \\hello.js
console.log(__filename, JSON.stringify(__filename));
[/tmp]$ nsolid \\hello.js 
/tmp/\hello.js "/tmp/\\hello.js"

Make sure the `url` field is escaped to avoid generating invalid JSON.

PR-URL: #60
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Juan José Arboleda <soyjuanarbol@gmail.com>
@santigimeno santigimeno force-pushed the santi/fix_v8_serializer branch from 4bd618c to ccc7e91 Compare January 9, 2024 18:05
@santigimeno santigimeno merged commit ccc7e91 into node-v20.x-nsolid-v5.x Jan 9, 2024
14 of 16 checks passed
@santigimeno santigimeno deleted the santi/fix_v8_serializer branch January 9, 2024 18:07
trevnorris pushed a commit that referenced this pull request Jan 9, 2024
Make sure the `url` field is escaped to avoid generating invalid JSON.

PR-URL: #60
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Juan José Arboleda <soyjuanarbol@gmail.com>
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.

3 participants