mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
fix for ip OR conditional
This commit is contained in:
parent
bedc08cb58
commit
ea467c1eef
1 changed files with 1 additions and 1 deletions
|
@ -304,7 +304,7 @@ class Site < Sequel::Model
|
|||
return false if ENV['RACK_ENV'] == 'production' && ip == '127.0.0.1'
|
||||
return false if ip.blank?
|
||||
return true if Site.where(is_banned: true).
|
||||
where(Sequel.or(ip: ip, ip: hash_ip(ip))).
|
||||
where(ip: [ip, hash_ip(ip)]).
|
||||
where(['updated_at > ?', Time.now-BANNED_TIME]).
|
||||
first
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue