mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
업로드 파일명 처리 관련 버그 수정
xpressengine/xe-core#2008 xpressengine/xe-core#2269
This commit is contained in:
parent
a0d688df9d
commit
d069cf1194
3 changed files with 6 additions and 2 deletions
|
|
@ -30,6 +30,9 @@ class FilenameFilter
|
|||
$filename = trim($filename, ' .-_');
|
||||
$filename = preg_replace('/__+/', '_', $filename);
|
||||
|
||||
// Clean up unnecessary encodings.
|
||||
$filename = strtr($filename, array('&' => '&'));
|
||||
|
||||
// Change .php files to .phps to make them non-executable.
|
||||
if (strtolower(substr($filename, strlen($filename) - 4)) === '.php')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ class UA
|
|||
|
||||
case 'rfc5987':
|
||||
$filename = rawurlencode($filename);
|
||||
return "filename*=UTF-8''" . $filename . '; filename="' . $filename . '"';
|
||||
return "filename*=UTF-8''" . $filename;
|
||||
|
||||
case 'old_ie':
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -386,7 +386,8 @@
|
|||
|
||||
data.files[file.file_srl] = file;
|
||||
$container.data(data);
|
||||
|
||||
|
||||
file.source_filename = file.source_filename.replace("&", "&");
|
||||
if(/\.(jpe?g|png|gif)$/i.test(file.source_filename)) {
|
||||
result_image.push(template_fileimte_image(file));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue