Fix insufficient origin validation

This commit is contained in:
Claire
2024-01-29 12:02:41 +01:00
parent 5f8618443c
commit b3339ffe59
16 changed files with 36 additions and 40 deletions

View File

@@ -155,8 +155,8 @@ module JsonLdHelper
end
end
def fetch_resource(uri, id, on_behalf_of = nil)
unless id
def fetch_resource(uri, id_is_known, on_behalf_of = nil)
unless id_is_known
json = fetch_resource_without_id_validation(uri, on_behalf_of)
return if !json.is_a?(Hash) || unsupported_uri_scheme?(json['id'])