summaryrefslogtreecommitdiff
path: root/tests/test_receiver.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove extraneous calls to .strip() in Chunked EncodingBert JW Regeer2022-03-121-1/+3
| | | | | | | | To be valid chunked encoding we should not be removing any whitespace as the standard does not allow for optional whitespace. If whitespace is encountered in the wrong place, it should lead to a 400 Bad Request instead.
* Validate chunk size in Chunked Encoding are HEXDIGBert JW Regeer2022-03-121-0/+12
| | | | | | | | | | | | RFC7230 states that a chunk-size should be 1*HEXDIG, this is now validated before passing the resulting string to int() which would also parse other formats for hex, such as: `0x01` as `1` and `+0x01` as `1`. This would lead to a potential for a frontend proxy server and waitress to disagree on where a chunk started and ended, thereby potentially leading to request smuggling. With the increased validation if the size is not just hex digits, Waitress now returns a Bad Request and stops processing the request.
* Error when receiving back Chunk ExtensionBert JW Regeer2022-03-121-0/+37
| | | | | | | | | | | Waitress discards chunked extensions and does no further processing on them, however it failed to validate that the chunked encoding extension did not contain invalid data. We now validate that if there are any chunked extensions that they are well-formed, if they are not and contain invalid characters, then Waitress will now correctly return a Bad Request and stop any further processing of the request.
* Remove object from class definitionBert JW Regeer2020-08-151-1/+1
|
* Move tests to top directoryBert JW Regeer2020-04-161-0/+242