json-rust
json-rust copied to clipboard
Incorrectly accepting input with form feeds?
I just ran https://github.com/nst/JSONTestSuite to see how we're doing, and I saw that json-rust is accepting this sample that's supposed to fail parsing. According to the grammar, the allowed whitespace characters are:
ws = *(
%x20 / ; Space
%x09 / ; Horizontal tab
%x0A / ; Line feed or New line
%x0D ) ; Carriage return
Form feed is %x0C
. I think if you replaced this code with b' ' | b'\n' | b'\t' | b'\r' => ...
you should be safe.