Fix insufficient Content-Type checking of fetched ActivityStreams objects

This commit is contained in:
Claire
2024-02-08 13:32:28 +01:00
parent 4216779759
commit e6e43b642a
12 changed files with 50 additions and 42 deletions

View File

@@ -44,7 +44,7 @@ class FetchResourceService < BaseService
@response_code = response.code
return nil if response.code != 200
if ['application/activity+json', 'application/ld+json'].include?(response.mime_type)
if valid_activitypub_content_type?(response)
body = response.body_with_limit
json = body_to_json(body)