mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-29 02:50:46 +00:00
Fix redirect to external object when URL is missing or malformed (#36347)
This commit is contained in:
parent
a86078e8bb
commit
414f8ff60d
|
|
@ -26,7 +26,7 @@ class PermalinkRedirector
|
|||
end
|
||||
|
||||
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')
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user