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 vmstan committed Jan 5, 2024
1 parent b0488e3 commit 1416f4f
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 @@ -29,7 +29,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 1416f4f

Please sign in to comment.