This project is archived and is in readonly mode.
method original_filename in UploadFile module is broken
-
Armando Di Cianno
I've narrowed down the problem to line 596 in read_multipart in request.rb (same file as above method).
head =~ /Content-Disposition:.* filename=(?:"((?:\\.|[^\"]))"|([^;]))/ni
So, given
str = "Content-Disposition: filename=\" &;()<>|!{}[]'\"*?~\\$`.mpg\""
then
str =~ /Content-Disposition:.* filename=(?:"((?:\\.|[^\"]))"|([^;]))/ni
we get
>> $1
=> " &;()<>|!{}[]'"
>> $2
=> nil