about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-11-14 08:07:14 +0100
committerGitHub <noreply@github.com>2022-11-14 08:07:14 +0100
commit552d69ad96fec7ebfca46a97c50355678e114223 (patch)
tree556b705e06afd75f93c5b78d90604218cd796e33 /app
parent523e106cbf2f0cd846d0514e7a5b38ea6c62fe8b (diff)
Fix error when invalid domain name is submitted (#19474)
Fix #19175
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/domain_normalizable.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/concerns/domain_normalizable.rb b/app/models/concerns/domain_normalizable.rb
index fb84058fc..8e244c1d8 100644
--- a/app/models/concerns/domain_normalizable.rb
+++ b/app/models/concerns/domain_normalizable.rb
@@ -11,5 +11,7 @@ module DomainNormalizable
 
   def normalize_domain
     self.domain = TagManager.instance.normalize_domain(domain&.strip)
+  rescue Addressable::URI::InvalidURIError
+    errors.add(:domain, :invalid)
   end
 end