diff --git a/common.php b/common.php
index 99765e440..0ba43ce95 100644
--- a/common.php
+++ b/common.php
@@ -227,7 +227,7 @@ if (isset($_REQUEST['sfl'])) {
if (isset($_REQUEST['stx'])) { // search text (검색어)
- $stx = trim($_REQUEST['stx']);
+ $stx = get_search_string(trim($_REQUEST['stx']));
if ($stx)
$qstr .= '&stx=' . urlencode(cut_str($stx, 20, ''));
} else {
diff --git a/lib/common.lib.php b/lib/common.lib.php
index 804eeff73..5462666ac 100644
--- a/lib/common.lib.php
+++ b/lib/common.lib.php
@@ -2677,6 +2677,26 @@ function conv_date_format($format, $date, $add='')
return date($format, $timestamp);
}
+// 검색어 특수문자 제거
+function get_search_string($stx)
+{
+ $stx_pattern = array();
+ $stx_pattern[] = '#\.*/+#';
+ $stx_pattern[] = '#\\\*#';
+ $stx_pattern[] = '#\.{2,}#';
+ $stx_pattern[] = '#[/\'\"%=*\#\(\)\|\+\-\&\!\$@~\{\}\[\]`]+#';
+
+ $stx_replace = array();
+ $stx_replace[] = '';
+ $stx_replace[] = '';
+ $stx_replace[] = '.';
+ $stx_replace[] = '';
+
+ $stx = preg_replace($stx_pattern, $stx_replace, $stx);
+
+ return $stx;
+}
+
// unescape nl 얻기
function conv_unescape_nl($str)
{
diff --git a/plugin/lgxpay/AuthOnlyReq.php b/plugin/lgxpay/AuthOnlyReq.php
index 9802a443b..dcc66fa5f 100644
--- a/plugin/lgxpay/AuthOnlyReq.php
+++ b/plugin/lgxpay/AuthOnlyReq.php
@@ -101,7 +101,7 @@ function do_Authonly() {
-
+