about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-14 05:42:49 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-14 05:42:49 -0600
commitc84dfd5285bc57761ae3c2c5a5eb466baa3d3218 (patch)
tree6ca0f0ad9e1e3fdaf47beb3770206562034a9827 /app
parent93bed8dda9657ad65c5ce28e469058e86ec7b17b (diff)
make secure mode also check for blocked subdomains
Diffstat (limited to 'app')
-rw-r--r--app/models/domain_block.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb
index 2c577ec13..c7395f7a3 100644
--- a/app/models/domain_block.rb
+++ b/app/models/domain_block.rb
@@ -32,7 +32,7 @@ class DomainBlock < ApplicationRecord
   before_save :set_processing
 
   def self.blocked?(domain)
-    where(domain: domain, severity: :suspend).exists?
+    suspend.where(domain: domain).or(suspend.where('domain LIKE ?', "%.#{domain}")).exists?
   end
 
   def self.force_unlisted?(domain)