From 59067047d13b6c49e72f5412e66ec37d65534c5a Mon Sep 17 00:00:00 2001 From: upgle Date: Wed, 14 May 2014 16:15:39 +0545 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EB=B9=84=EC=BD=98=EC=9D=B4=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=20=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 정규식 검사에서 업로드된 file의 타입을 검사함으로서 파일이 등록되지 않는 이슈. 정상적인 ico 파일 업로드시 '*.ico 파일만 업로드 가능합니다.' 라는 오류 출력 tmp file의 'name'을 검사하도록 변경하여 이슈 해결 --- modules/install/install.admin.controller.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/install/install.admin.controller.php b/modules/install/install.admin.controller.php index f0f3bb6d2..9cdb759fa 100644 --- a/modules/install/install.admin.controller.php +++ b/modules/install/install.admin.controller.php @@ -328,14 +328,13 @@ class installAdminController extends install private function saveIconTmp($icon, $iconname) { $target_file = $icon['tmp_name']; - $type = $icon['type']; $relative_filename = 'files/attach/xeicon/tmp/'.$iconname; $target_filename = _XE_PATH_.$relative_filename; list($width, $height, $type_no, $attrs) = @getimagesize($target_file); if($iconname == 'favicon.ico') { - if(!preg_match('/^.*\.ico$/i',$type)) { + if(!preg_match('/^.*\.ico$/i',$icon['name'])) { Context::set('msg', '*.ico '.Context::getLang('msg_possible_only_file')); return; } @@ -346,7 +345,7 @@ class installAdminController extends install } else if($iconname == 'mobicon.png') { - if(!preg_match('/^.*\.png$/i',$type)) { + if(!preg_match('/^.*\.png$/i',$icon['name'])) { Context::set('msg', '*.png '.Context::getLang('msg_possible_only_file')); return; }