mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 01:57:15 +08:00
FIX: use allowlist and blocklist terminology (#10209)
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
This commit is contained in:

committed by
GitHub

parent
5077cf52fd
commit
e0d9232259
@ -12,9 +12,9 @@ class UploadValidator < ActiveModel::Validator
|
||||
return true if upload.user&.staff?
|
||||
end
|
||||
|
||||
# check the attachment blacklist
|
||||
# check the attachment blocklist
|
||||
if upload.for_group_message && SiteSetting.allow_all_attachments_for_group_messages
|
||||
return upload.original_filename =~ SiteSetting.attachment_filename_blacklist_regex
|
||||
return upload.original_filename =~ SiteSetting.blocked_attachment_filenames_regex
|
||||
end
|
||||
|
||||
extension = File.extname(upload.original_filename)[1..-1] || ""
|
||||
|
Reference in New Issue
Block a user