Commit a49c59f5 by Anton Smirnov Committed by Tute Costa

Ignore invalid Content-Disposition header (#2284)

* ignore invalid content-disposition header

[fixes #2283]
parent 4b617ff5
...@@ -29,8 +29,9 @@ module Paperclip ...@@ -29,8 +29,9 @@ module Paperclip
def filename_from_content_disposition def filename_from_content_disposition
if @content.meta.has_key?("content-disposition") if @content.meta.has_key?("content-disposition")
@content.meta["content-disposition"]. matches = @content.meta["content-disposition"].
match(/filename="([^"]*)"/)[1] match(/filename="([^"]*)"/)
matches[1] if matches
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment