You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 +
The text was updated successfully, but these errors were encountered:
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 +
The text was updated successfully, but these errors were encountered: