Filenames with a + give File Not Found Error due to use of urlencode/urldecode instead of rawurlencode/rawurldecode
Attempting to download a file that contains a + in it does not work, and failed with a 'File Not Found' error.
This appears to be due to the filename been passed back to the php script on the query string after been passed through urlencode() and the script receiving it and decoding it with urldecode()
With this, spaces get encoded as + and a + gets decoded back to a space.
If the original string (filename) actually contained a +, this gets incorrectly converted to a space by urldecode, causing it not to find the file on the disk.
We should be using rawurlencode and rawurldecode instead to comply with RFC 3986. This would encode spaces correctly as %20 and not mishandle the +
Could a developer on this project comment on this?
thanks for sharing, i'll check it out.