diff options
author | ExtReMLapin <3909752+ExtReMLapin@users.noreply.github.com> | 2024-03-05 17:33:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 18:33:08 +0200 |
commit | 3de31677d36aa4f82d4d99898902d7bcf398e666 (patch) | |
tree | da42e8e31b5f0a706de08a5a4c99e98212f9b341 | |
parent | 82cb31eb93fd19b74115e0f0133225d1dfdbfdbc (diff) |
grammars : blacklists character control set (#5888)
* Prevent control characters from being served in json string
* Prevent control characters from being served in json string (array)
-rw-r--r-- | grammars/json.gbnf | 2 | ||||
-rw-r--r-- | grammars/json_arr.gbnf | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/grammars/json.gbnf b/grammars/json.gbnf index a9537cdf..a8a80752 100644 --- a/grammars/json.gbnf +++ b/grammars/json.gbnf @@ -15,7 +15,7 @@ array ::= string ::= "\"" ( - [^"\\] | + [^"\\\x7F\x00-\x1F] | "\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes )* "\"" ws diff --git a/grammars/json_arr.gbnf b/grammars/json_arr.gbnf index ef53e77a..31a3202f 100644 --- a/grammars/json_arr.gbnf +++ b/grammars/json_arr.gbnf @@ -24,7 +24,7 @@ array ::= string ::= "\"" ( - [^"\\] | + [^"\\\x7F\x00-\x1F] | "\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes )* "\"" ws |