in reply to RE: Download, don't redirect.
in thread Download, don't redirect.
Someone might even find THAT snippet of some interest... But as you can see from the above, the security risk of getting ../ in your file name was caught. Only God knows what other security risks could be involved nowadays!sub ReadParse { read(STDIN, $buf, $ENV{'CONTENT_LENGTH'}); @li = (split(/&/, $buf), split(/&/, $ENV{'QUERY_STRING'})); foreach my $input (@li) { $input =~ tr/+/ /; $input =~ s/%(..)/pack("C", hex($1))/eg; $input =~ s/\.\.\///g; ($name, $val) = split(/=/, $input); $name =~ tr/A-Z/a-z/; $in{$name}=$val; } }
|
|---|