Skip to content

Commit

Permalink
Fix crash when encountering invalid URL (mastodon#26814)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and wesley-crusherr committed Aug 28, 2024
1 parent 9b5516d commit 71097a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/tag_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def local_url?(url)
domain = uri.host + (uri.port ? ":#{uri.port}" : '')

TagManager.instance.web_domain?(domain)
rescue Addressable::URI::InvalidURIError
rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError
false
end
end

0 comments on commit 71097a4

Please sign in to comment.