mirror of
https://github.com/jointakahe/takahe.git
synced 2024-12-23 14:00:28 +00:00
Don't allow empty or bad actor responses
This commit is contained in:
parent
480fa70b1f
commit
3f37c7ffe7
1 changed files with 2 additions and 0 deletions
|
@ -470,6 +470,8 @@ class Identity(StatorModel):
|
|||
f"Client error fetching actor: {response.status_code}", response.content
|
||||
)
|
||||
document = canonicalise(response.json(), include_security=True)
|
||||
if "type" not in document:
|
||||
return False
|
||||
self.name = document.get("name")
|
||||
self.profile_uri = document.get("url")
|
||||
self.inbox_uri = document.get("inbox")
|
||||
|
|
Loading…
Reference in a new issue