trustworthy_attribution - Bounce bad URIs (#37372)
This commit is contained in:
1 parent
ba8e495631
commit
6ab24de659
1 file changed
+1
@@ -60,6 +60,7 @@ class ActivityPub::FetchRemoteStatusService < BaseService
|
||||
|
||||
def trustworthy_attribution?(uri, attributed_to)
|
||||
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?
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user