From e46051ca94690782ca24741a570f2051296cd2d5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 4 Jan 2020 01:54:07 +0100 Subject: port tootsuite#12748 to monsterfork: Fix base64-encoded file uploads not being possible Fix #3804, Fix #5776 --- app/controllers/concerns/obfuscate_filename.rb | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 app/controllers/concerns/obfuscate_filename.rb (limited to 'app/controllers/concerns') diff --git a/app/controllers/concerns/obfuscate_filename.rb b/app/controllers/concerns/obfuscate_filename.rb deleted file mode 100644 index 22736ec3a..000000000 --- a/app/controllers/concerns/obfuscate_filename.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module ObfuscateFilename - extend ActiveSupport::Concern - - class_methods do - def obfuscate_filename(path) - before_action do - file = params.dig(*path) - next if file.nil? - - file.original_filename = SecureRandom.hex(8) + File.extname(file.original_filename) - end - end - end -end -- cgit