mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix double escape of filename in short download URL #2611
This commit is contained in:
parent
d671f0468c
commit
47cb8ca4ff
2 changed files with 3 additions and 3 deletions
|
|
@ -307,7 +307,7 @@ class FileController extends File
|
||||||
|
|
||||||
$file_srl = Context::get('file_srl');
|
$file_srl = Context::get('file_srl');
|
||||||
$sid = Context::get('sid');
|
$sid = Context::get('sid');
|
||||||
$filename_arg = Context::get('filename');
|
$filename_arg = htmlspecialchars_decode(Context::get('filename'));
|
||||||
|
|
||||||
// Get file information from the DB
|
// Get file information from the DB
|
||||||
$file_obj = FileModel::getFile($file_srl);
|
$file_obj = FileModel::getFile($file_srl);
|
||||||
|
|
@ -434,7 +434,7 @@ class FileController extends File
|
||||||
// Get requsted file info
|
// Get requsted file info
|
||||||
$file_srl = Context::get('file_srl');
|
$file_srl = Context::get('file_srl');
|
||||||
$file_key = Context::get('file_key');
|
$file_key = Context::get('file_key');
|
||||||
$filename_arg = Context::get('filename');
|
$filename_arg = htmlspecialchars_decode(Context::get('filename'));
|
||||||
|
|
||||||
$columnList = array('source_filename', 'uploaded_filename', 'file_size');
|
$columnList = array('source_filename', 'uploaded_filename', 'file_size');
|
||||||
$file_obj = FileModel::getFile($file_srl, $columnList);
|
$file_obj = FileModel::getFile($file_srl, $columnList);
|
||||||
|
|
|
||||||
|
|
@ -476,8 +476,8 @@ class FileModel extends File
|
||||||
$nullList = array();
|
$nullList = array();
|
||||||
foreach ($output->data as $file)
|
foreach ($output->data as $file)
|
||||||
{
|
{
|
||||||
$file->source_filename = escape($file->source_filename, false);
|
|
||||||
$file->download_url = self::getDownloadUrl($file->file_srl, $file->sid, 0, $file->source_filename);
|
$file->download_url = self::getDownloadUrl($file->file_srl, $file->sid, 0, $file->source_filename);
|
||||||
|
$file->source_filename = escape($file->source_filename, false);
|
||||||
$fileList[] = $file;
|
$fileList[] = $file;
|
||||||
if ($file->upload_target_type === null)
|
if ($file->upload_target_type === null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue