mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
whitelisting for blackbox
This commit is contained in:
parent
675a182b89
commit
82462b2461
2 changed files with 13 additions and 1 deletions
9
migrations/114_site_blackbox_whitelist.rb
Normal file
9
migrations/114_site_blackbox_whitelist.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
Sequel.migration do
|
||||
up {
|
||||
DB.add_column :sites, :blackbox_whitelisted, :boolean, default: false
|
||||
}
|
||||
|
||||
down {
|
||||
DB.drop_column :sites, :blackbox_whitelisted
|
||||
}
|
||||
end
|
|
@ -1684,7 +1684,10 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
if pathname.extname.match(HTML_REGEX) && defined?(BlackBox)
|
||||
BlackBox.tos_violation_check self, uploaded
|
||||
begin
|
||||
BlackBox.tos_violation_check self, uploaded
|
||||
rescue
|
||||
end
|
||||
end
|
||||
|
||||
relative_path_dir = Pathname(relative_path).dirname
|
||||
|
|
Loading…
Add table
Reference in a new issue