mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
SECURITY: force IM decoder based on file extension - part 2
This commit is contained in:
@ -123,7 +123,7 @@ class OptimizedImage < ActiveRecord::Base
|
||||
def self.prepend_decoder!(path)
|
||||
extension = File.extname(path)[1..-1]
|
||||
raise Discourse::InvalidAccess unless extension[IM_DECODERS]
|
||||
"#{extension}:#{path}"
|
||||
path = "#{extension}:#{path}"
|
||||
end
|
||||
|
||||
def self.thumbnail_or_resize
|
||||
|
Reference in New Issue
Block a user