trustworthy_attribution - Bounce bad URIs (#37372)
This commit is contained in:
parent
ba8e495631
commit
6ab24de659
@ -60,6 +60,7 @@ class ActivityPub::FetchRemoteStatusService < BaseService
|
|||||||
|
|
||||||
def trustworthy_attribution?(uri, attributed_to)
|
def trustworthy_attribution?(uri, attributed_to)
|
||||||
return false if uri.nil? || attributed_to.nil?
|
return false if uri.nil? || attributed_to.nil?
|
||||||
|
return false if unsupported_uri_scheme?(uri) || unsupported_uri_scheme?(attributed_to)
|
||||||
|
|
||||||
Addressable::URI.parse(uri).normalized_host.casecmp(Addressable::URI.parse(attributed_to).normalized_host).zero?
|
Addressable::URI.parse(uri).normalized_host.casecmp(Addressable::URI.parse(attributed_to).normalized_host).zero?
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user