mirror of
https://github.com/neocities/neocities.git
synced 2025-08-02 07:41:52 +02:00
no whitelist for catbus and fatcat
This commit is contained in:
parent
8bdf4e7663
commit
2a36bca4c0
4 changed files with 53 additions and 7 deletions
|
@ -459,6 +459,11 @@ class Site < Sequel::Model
|
|||
!username.empty? && username.match(/^[a-zA-Z0-9_\-]+$/i)
|
||||
end
|
||||
|
||||
def okay_to_upload?(uploaded_file)
|
||||
return true if [:catbus, :fatcat].include?(plan_type.to_sym)
|
||||
self.class.valid_file_type?(uploaded_file)
|
||||
end
|
||||
|
||||
def self.valid_file_type?(uploaded_file)
|
||||
mime_type = Magic.guess_file_mime_type uploaded_file[:tempfile].path
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue