lib/rack/multipart/parser.rb in rack-2.1.4 vs lib/rack/multipart/parser.rb in rack-2.1.4.1
- old
+ new
@@ -307,11 +307,12 @@
if filename = params['filename']
filename = $1 if filename =~ /^"(.*)"$/
elsif filename = params['filename*']
encoding, _, filename = filename.split("'", 3)
end
- when BROKEN_QUOTED, BROKEN_UNQUOTED
+ when BROKEN
filename = $1
+ filename = $1 if filename =~ /^"(.*)"$/
end
return unless filename
if filename.scan(/%.?.?/).all? { |s| /%[0-9a-fA-F]{2}/.match?(s) }