From 78dc1a91d3bd112e90822d5696b45353eaf3d3d6 Mon Sep 17 00:00:00 2001 From: thisgun Date: Wed, 8 May 2019 14:10:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=98=EB=AA=BB=EB=90=9C=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/password_check.php | 2 +- extend/g5_54version_update.extend.php | 6 +++--- lib/uri.lib.php | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bbs/password_check.php b/bbs/password_check.php index 5cc197afc..9eab6e5fe 100644 --- a/bbs/password_check.php +++ b/bbs/password_check.php @@ -47,5 +47,5 @@ if ($w == 's') { } else alert('w 값이 제대로 넘어오지 않았습니다.'); -goto_url(G5_HTTP_BBS_URL.'/board.php?'.$qstr); +goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?'.$qstr)); ?> diff --git a/extend/g5_54version_update.extend.php b/extend/g5_54version_update.extend.php index 51ba07328..5b986da2f 100644 --- a/extend/g5_54version_update.extend.php +++ b/extend/g5_54version_update.extend.php @@ -17,8 +17,8 @@ function g54_return_invalid_password($bool, $type, $wr){ return $bool; } -function g54_check_bbs_password($type, $wr, $qstr){ - if($type === 'bbs' && $wr['wr_password'] && isset($_POST['wr_password'])) { +function g54_check_bbs_password($type, $wr, $qstr=''){ + if($type === 'bbs' && (isset($wr['wr_password']) && $wr['wr_password']) && isset($_POST['wr_password'])) { global $bo_table, $w; @@ -31,7 +31,7 @@ function g54_check_bbs_password($type, $wr, $qstr){ $ss_name = 'ss_secret_comment_'.$bo_table.'_'.$wr['wr_id']; set_session($ss_name, TRUE); } - goto_url(G5_HTTP_BBS_URL.'/board.php?'.$qstr); + goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?'.$qstr)); } } } diff --git a/lib/uri.lib.php b/lib/uri.lib.php index 06915966a..286fabccc 100644 --- a/lib/uri.lib.php +++ b/lib/uri.lib.php @@ -157,7 +157,8 @@ function short_url_clean($string_url, $add_qry=''){ $str_path = isset($url['path']) ? $url['path'] : ''; $http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 'https://' : 'http://'; - $host = $http.$url['host'].str_replace($array_file_paths, '', $str_path); + $port = (isset($url['port']) && ($url['port']!==80 || $url['port']!==443)) ? ':'.$url['port'] : ''; + $host = $http.$url['host'].$port.str_replace($array_file_paths, '', $str_path); } $add_param = '';