mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
trustworthy_attribution - Bounce bad URIs (#37372)
This commit is contained in:
@@ -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