Skip to content

Commit

Permalink
Add must-fail tests for padding byte in non-terminal position
Browse files Browse the repository at this point in the history
From https://httpwg.org/specs/rfc9651.html#parse-binary:

> This specification does not relax the requirements in Sections 3.1 and 3.3 of
RFC4648; therefore, parsers MUST fail on characters outside the base64
alphabet and on line feeds in encoded data.
  • Loading branch information
apasel422 committed Jan 28, 2025
1 parent 8e99663 commit be8f069
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions binary.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
{"__type": "binary", "value": ""},
[]]
},
{
"name": "padding at beginning",
"raw": [":=aGVsbG8=:"],
"header_type": "item",
"must_fail": true
},
{
"name": "padding in middle",
"raw": [":a=GVsbG8=:"],
"header_type": "item",
"must_fail": true
},
{
"name": "bad padding",
"raw": [":aGVsbG8:"],
Expand Down

0 comments on commit be8f069

Please sign in to comment.