diff options
-rw-r--r-- | app/helpers/domain_control_helper.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/helpers/domain_control_helper.rb b/app/helpers/domain_control_helper.rb index 765ffa536..d061de492 100644 --- a/app/helpers/domain_control_helper.rb +++ b/app/helpers/domain_control_helper.rb @@ -12,11 +12,9 @@ module DomainControlHelper end end - if whitelist_mode? - !DomainAllow.allowed?(domain) - else - DomainBlock.blocked?(domain) - end + !DomainAllow.allowed?(domain) || DomainBlock.blocked?(domain) + rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError + nil end def whitelist_mode? |