-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix potential vulnerability when fetching remote json data
- Loading branch information
1 parent
7c34ac7
commit 6f31dc5
Showing
8 changed files
with
22 additions
and
16 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
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 |
---|---|---|
|
@@ -109,6 +109,7 @@ def test_fetch_actor(httpx_mock, config_system): | |
# Trigger actor fetch | ||
httpx_mock.add_response( | ||
url="https://example.com/.well-known/webfinger?resource=acct:[email protected]", | ||
headers={"Content-Type": "application/activity+json"}, | ||
json={ | ||
"subject": "acct:[email protected]", | ||
"aliases": [ | ||
|
@@ -130,6 +131,7 @@ def test_fetch_actor(httpx_mock, config_system): | |
) | ||
httpx_mock.add_response( | ||
url="https://example.com/test-actor/", | ||
headers={"Content-Type": "application/activity+json"}, | ||
json={ | ||
"@context": [ | ||
"https://www.w3.org/ns/activitystreams", | ||
|
@@ -170,6 +172,7 @@ def test_fetch_actor(httpx_mock, config_system): | |
) | ||
httpx_mock.add_response( | ||
url="https://example.com/test-actor/collections/featured/", | ||
headers={"Content-Type": "application/activity+json"}, | ||
json={ | ||
"type": "Collection", | ||
"totalItems": 1, | ||
|
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