diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-14 05:42:49 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-14 05:42:49 -0600 |
commit | c84dfd5285bc57761ae3c2c5a5eb466baa3d3218 (patch) | |
tree | 6ca0f0ad9e1e3fdaf47beb3770206562034a9827 /app | |
parent | 93bed8dda9657ad65c5ce28e469058e86ec7b17b (diff) |
make secure mode also check for blocked subdomains
Diffstat (limited to 'app')
-rw-r--r-- | app/models/domain_block.rb | 2 |
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) |