JSON scanner incorrectly accepts '\Uxxxxxxxx'
Open
v1
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 657
- Avg merge
- 20h 36m
- Merged PRs (30d)
- 6
Description
The JSON scanner accepts `\Uxxxxxxxx` sequences:
See https://github.com/hashicorp/hcl/blob/master/json/scanner/scanner.go#L338
But this is not valid in JSON:
https://tools.ietf.org/html/rfc7159#page-8
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at json/scanner/scanner.go around line 338 and compare the accepted escape sequences with RFC 7159 page 8. Update the scanner so \Uxxxxxxxx is rejected as invalid JSON, then verify the scanner behavior with the repository's existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100