Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Ignore invalid Content-Disposition header #2284

Merged
merged 2 commits into from Aug 24, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/paperclip/io_adapters/uri_adapter.rb
Expand Up @@ -29,8 +29,8 @@ def content_type_from_content

def filename_from_content_disposition
if @content.meta.has_key?("content-disposition")
@content.meta["content-disposition"].
match(/filename="([^"]*)"/)[1]
matches = @content.meta["content-disposition"].match(/filename="([^"]*)"/)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [82/80]

matches[1] if matches
end
end

Expand Down