Commit Graph

2 Commits

Author SHA1 Message Date
PelleK
d886bc2eba
Cleanup code to python 3.6 (#342)
* Cleanup setup.py

* remove explicit inheritance from object

* convert most string interpolations to f-strings

Co-authored-by: Pelle Koster <pelle.koster@nginfra.nl>
2020-10-07 20:45:51 -05:00
Matthew Planchard
1375a67c55 CRLF Injection Mitigation
Resolves #237

Previously, we were not running any sort of URL escaping on values
passed in from the client that were used for redirects. This allowed
injection attacks via URL encoded newlines in the original request.

This update ensures that all user-supplied paths that are used as
components of redirects are passed through `urllib.parse.quote()`
(or the python 2 equivalent) prior to being used in a redirect
response.

Also specified 127.0.0.1 rather than 0.0.0.0 (the default) in server
tests to avoid triggering firewall dialogs when testing on MacOS
2019-01-24 17:53:03 -06:00