-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix (again) possible open redirect vulnerability. (#897)
Improve the regex (thanks Brandon Elliot) to catch more crafted relative paths that browsers convert to absolute. Add the "absolute" option to SECURITY_REDIRECT_VALIDATE_MODE which restores Werkzeug prior behavior of converting all Location header values into absolute paths rather than relative (autocorrect_location_header=True). This is the backport to 5.3
- Loading branch information
Showing
12 changed files
with
170 additions
and
50 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
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 |
---|---|---|
|
@@ -134,4 +134,4 @@ | |
) | ||
from .webauthn_util import WebauthnUtil | ||
|
||
__version__ = "5.3.2" | ||
__version__ = "5.3.3" |
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 |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
from tests.test_utils import ( | ||
authenticate, | ||
capture_flashes, | ||
check_location, | ||
get_auth_token_version_3x, | ||
get_form_action, | ||
get_num_queries, | ||
|
@@ -183,13 +184,13 @@ def test_login_form_username(client): | |
|
||
|
||
@pytest.mark.settings(username_enable=True, username_required=True) | ||
def test_login_form_username_required(client): | ||
def test_login_form_username_required(app, client): | ||
# If username required - we should still be able to login with email alone | ||
# given default user_identity_attributes | ||
response = client.post( | ||
"/login", data=dict(email="[email protected]", password="password") | ||
) | ||
assert response.location == "/" | ||
assert check_location(app, response.location, "/") | ||
|
||
|
||
@pytest.mark.confirmable() | ||
|
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
Oops, something went wrong.