-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify the next value also when setting it
- Loading branch information
Showing
3 changed files
with
16 additions
and
2 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 |
---|---|---|
|
@@ -223,6 +223,13 @@ def test_authlib(self): | |
{"[email protected]", "[email protected]"}, | ||
) | ||
|
||
def test_invalid_next_cookie(self): | ||
client = Client() | ||
response = client.get("/login/?next=http://example.com") | ||
FacebookOAuth2Client.get_user_data = lambda self: {"email": "[email protected]"} | ||
response = client.get("/oauth/facebook/?code=bla") | ||
self.assertRedirects(response, "/?login=1", fetch_redirect_response=False) | ||
|
||
def test_str_and_email_obfuscate(self): | ||
user = User(email="[email protected]") | ||
self.assertEqual(user.get_full_name(), "jus***@***.com") | ||
|