Fix redirect to external object when URL is missing or malformed (#36347)

pull/36412/head
Claire 2 months ago
parent 6ae1b4fae9
commit cb0065cfe9

@ -26,7 +26,7 @@ class PermalinkRedirector
end end
def redirect_path def redirect_path
return ActivityPub::TagManager.instance.url_for(object) if object.present? return ActivityPub::TagManager.instance.url_for(object) || ActivityPub::TagManager.instance.uri_for(object) if object.present?
@path.delete_prefix('/deck') if @path.start_with?('/deck') @path.delete_prefix('/deck') if @path.start_with?('/deck')
end end

Loading…
Cancel
Save