-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
4ab0c77
commit 1375a67
Showing
6 changed files
with
65 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"""Test doubles.""" | ||
|
||
|
||
class Namespace(object): | ||
"""Simple namespace.""" | ||
|
||
def __init__(self, **kwargs): | ||
"""Instantiate the namespace with the provided kwargs.""" | ||
for k, v in kwargs.items(): | ||
setattr(self, k, v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters