mirror of
https://github.com/neocities/neocities.git
synced 2025-08-04 16:51:36 +02:00
Fix for nonstandard file rename with supporter accounts
This commit is contained in:
parent
fea2ec55f9
commit
f5613d2776
2 changed files with 15 additions and 1 deletions
|
@ -56,7 +56,9 @@ class SiteFile < Sequel::Model
|
|||
mime_type = Magic.guess_file_mime_type site.files_path(self.path)
|
||||
extname = File.extname new_path
|
||||
|
||||
return false, 'unsupported file type' unless site.class.valid_file_mime_type_and_ext?(mime_type, extname)
|
||||
unless site.supporter? || site.class.valid_file_mime_type_and_ext?(mime_type, extname)
|
||||
return false, 'unsupported file type'
|
||||
end
|
||||
end
|
||||
|
||||
begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue