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

fix(repl): don't panic on lone surrogates #12899

Closed
wants to merge 6 commits into from

Conversation

lucacasonato
Copy link
Member

This commit fixes the pancis that occur when a user does various actions
using strings containing lone surrogates in the REPL. It does this by
introducing a new LossyString type that implements
serde::Deserialize. This deserializer supprots deserializing JSON
strings that contain lone surrogates. It replaces lone surrogates with
the unicode replacement character.

Fixes #12226 and #12447.

Waiting on merge and release of serde-rs/json#830.

This commit fixes the pancis that occur when a user does various actions
using strings containing lone surrogates in the REPL. It does this by
introducing a new `LossyString` type that implements
`serde::Deserialize`. This deserializer supprots deserializing JSON
strings that contain lone surrogates. It replaces lone surrogates with
the unicode replacement character.
Cargo.toml Outdated Show resolved Hide resolved
@stale
Copy link

stale bot commented Jan 24, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 24, 2022
@kitsonk kitsonk removed the stale label Jan 24, 2022
@kitsonk
Copy link
Contributor

kitsonk commented Jan 24, 2022

Should help with #13482 and fix #13481 right?

@lucacasonato
Copy link
Member Author

Should help with #13482 and fix #13481 right?

Yup, will fix both issues.

@stale
Copy link

stale bot commented May 25, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 25, 2022
@stale stale bot closed this Jun 4, 2022
@lucacasonato lucacasonato reopened this Jun 4, 2022
@stale stale bot removed the stale label Jun 4, 2022
@stale
Copy link

stale bot commented Sep 20, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 20, 2022
@stale stale bot closed this Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging strings with surrogate code points crashes deno
4 participants