From 6cfb34ab224b55eb7aa9df1e640c2bfb3294ec59 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 6 Nov 2017 16:47:24 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EC=98=81=EC=B9=B4=ED=8A=B8=20Reflected=20X?= =?UTF-8?q?SS=20(17-0789)=20=20=EC=B7=A8=EC=95=BD=EC=A0=90=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/menu_form.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adm/menu_form.php b/adm/menu_form.php index 15592bd33..8dee73269 100644 --- a/adm/menu_form.php +++ b/adm/menu_form.php @@ -8,6 +8,8 @@ if ($is_admin != 'super') $g5['title'] = '메뉴 추가'; include_once(G5_PATH.'/head.sub.php'); +$code = isset($code) ? preg_replace('/[^0-9a-zA-Z]/', '', strip_tags($code)) : ''; + // 코드 if($new == 'new' || !$code) { $code = base_convert(substr($code,0, 2), 36, 10); From 04620f2475585ed0f2ddf659bb852b0437584495 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 7 Nov 2017 09:55:36 +0900 Subject: [PATCH 2/3] =?UTF-8?q?thumbnail=20=EC=83=9D=EC=84=B1=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=9D=BC=EB=B6=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/thumbnail.lib.php | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 15ff52513..3f6c20866 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -284,6 +284,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h $is_large = true; // width, height 설정 + if($thumb_width) { if(!$thumb_height) { $thumb_height = round(($thumb_width * $size[1]) / $size[0]); @@ -348,7 +349,6 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h } else { // 비율에 맞게 생성 $dst = imagecreatetruecolor($dst_w, $dst_h); $bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색 - if($src_w > $src_h) { $tmp_h = round(($dst_w * $src_h) / $src_w); $dst_y = round(($dst_h - $tmp_h) / 2); @@ -384,8 +384,14 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h if($src_w < $dst_w) { if($src_h >= $dst_h) { - $dst_x = round(($dst_w - $src_w) / 2); - $src_h = $dst_h; + if( $src_h > $src_w ){ + $tmp_w = round(($dst_h * $src_w) / $src_h); + $dst_x = round(($dst_w - $tmp_w) / 2); + $dst_w = $tmp_w; + } else { + $dst_x = round(($dst_w - $src_w) / 2); + $src_h = $dst_h; + } } else { $dst_x = round(($dst_w - $src_w) / 2); $dst_y = round(($dst_h - $src_h) / 2); @@ -394,9 +400,15 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h } } else { if($src_h < $dst_h) { - $dst_y = round(($dst_h - $src_h) / 2); - $dst_h = $src_h; - $src_w = $dst_w; + if( $src_w > $dst_w ){ + $tmp_h = round(($dst_w * $src_h) / $src_w); + $dst_y = round(($dst_h - $tmp_h) / 2); + $dst_h = $tmp_h; + } else { + $dst_y = round(($dst_h - $src_h) / 2); + $dst_h = $src_h; + $src_w = $dst_w; + } } } From 0aa4ae0b96dcba41240f03837b9d60e29fb0c9fe Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 7 Nov 2017 10:04:47 +0900 Subject: [PATCH 3/3] =?UTF-8?q?5.2.9.6=20=EB=B2=84=EC=A0=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index db6fbdf42..145362077 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.2.9.5'); +define('G5_GNUBOARD_VER', '5.2.9.6'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true);