From 412c3e13ecae1bc9a6fd204b6e4018c5c4c2e6ba Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 6 Sep 2023 12:17:51 +0200 Subject: [PATCH] Fix crash when encountering invalid URL (#26814) --- app/lib/tag_manager.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb index d585ee7bb..b4671a0fb 100644 --- a/app/lib/tag_manager.rb +++ b/app/lib/tag_manager.rb @@ -27,5 +27,7 @@ class TagManager domain = uri.host + (uri.port ? ":#{uri.port}" : '') TagManager.instance.web_domain?(domain) + rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError + false end end