mirror of
https://github.com/iv-org/invidious.git
synced 2026-09-06 00:52:45 -05:00
Handle invalid custom emoji URLs
This commit is contained in:
parent
1588ac6d17
commit
bdf3ee5d0e
@ -48,7 +48,11 @@ private def render_description_attachment(attachment : JSON::Any, fallback : Str
|
||||
source_url = source["url"]?.try &.as_s?
|
||||
return if source_url.nil?
|
||||
|
||||
uri = URI.parse(source_url)
|
||||
uri = begin
|
||||
URI.parse(source_url)
|
||||
rescue URI::Error
|
||||
return
|
||||
end
|
||||
return if uri.scheme != "https"
|
||||
|
||||
# Custom emoji URLs use either host; the existing /ggpht proxy serves the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user