contao/test — Issue #816: Downloading files with special characters dont works
Author: importer
Created: 2011-11-29 06:50:56+00:00
State: open
Labels: Defect, framework

I cannot download any files, with special characters from the element type Download/Downloads.

I uploaded via ftp the following file:

xenorate_install_2.6_rc1(rev358).exe

I checked the source for frontend/ContentDownloads.php and i found the problem:

in_array($this->Input->get('file'), $this->multiSRC)

returns true if the filename url is found in the array.

This is basically correct, but:

In the multiSRC array the filenames are stored "not html escaped"

$this->Input->get('file') returns the filename url "html escaped".

So the "in_array" function returns false, and no file is send to the browser.

Escaped filename URL:
xenorate_install_2.6_rc1(rev358).exe

Unescaped filename URL:
xenorate_install_2.6_rc1(rev358).exe

Result: No match at all.

--- _Originally created by anonymous on June 19th, 2009, at 07:00pm (ID 816)_