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

strconv: Unquote does not reject invalid escape sequences #47853

Closed
dsnet opened this issue Aug 20, 2021 · 1 comment
Closed

strconv: Unquote does not reject invalid escape sequences #47853

dsnet opened this issue Aug 20, 2021 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dsnet
Copy link
Member

dsnet commented Aug 20, 2021

Considering the following snippet:

s, err := strconv.Unquote(`"\udead"`) // outputs "\ufffd", nil

This is incorrect as Unquote is supposed to parse a string literal according to the Go specification for string literals, which forbids surrogate halves. I expect this to report an error.

@gopherbot
Copy link

Change https://golang.org/cl/343877 mentions this issue: strconv: reject surrogate halves in Unquote

@mknyszek mknyszek added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 20, 2021
@mknyszek mknyszek modified the milestones: Backlog, Go1.18 Aug 20, 2021
@golang golang locked and limited conversation to collaborators Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants