diff --git a/adm/admin.lib.php b/adm/admin.lib.php
index 31f765e45..7f0d6f63e 100644
--- a/adm/admin.lib.php
+++ b/adm/admin.lib.php
@@ -477,8 +477,8 @@ function admin_check_xss_params($params){
if( is_array($value) ){
admin_check_xss_params($value);
- } else if ( preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value)) ){
- alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.');
+ } else if ( (preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) || (preg_match('/[onload|onerror]=.*/ius', $value) && preg_match('/(eval|expression|exec|prompt)(\s*)\((.*)\)/ius', $value)) ){
+ alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.', G5_URL);
die();
}
}
diff --git a/adm/board_form.php b/adm/board_form.php
index 3e60031d2..f75650a74 100644
--- a/adm/board_form.php
+++ b/adm/board_form.php
@@ -82,6 +82,7 @@ if (!isset($board['bo_use_captcha'])) {
$required = "";
$readonly = "";
+$sound_only = "";
if ($w == '') {
$html_title .= ' 생성';
diff --git a/adm/theme_detail.php b/adm/theme_detail.php
index a0018f707..616e72749 100644
--- a/adm/theme_detail.php
+++ b/adm/theme_detail.php
@@ -12,13 +12,13 @@ if(!in_array($theme, $theme_dir))
die('선택하신 테마가 설치되어 있지 않습니다.');
$info = get_theme_info($theme);
+$name = get_text($info['theme_name']);
if($info['screenshot'])
$screenshot = ' ';
else
$screenshot = ' ';
-$name = get_text($info['theme_name']);
if($info['theme_uri']) {
$name = ''.$name.' ';
}
diff --git a/adm/visit_search.php b/adm/visit_search.php
index e29a0e382..524f2026f 100644
--- a/adm/visit_search.php
+++ b/adm/visit_search.php
@@ -11,6 +11,11 @@ include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
$colspan = 6;
$listall = '처음 '; //페이지 처음으로 (초기화용도)
+$sql_search = '';
+
+if(isset($sfl) && $sfl && !in_array($sfl, array('vi_ip','vi_date','vi_time','vi_referer','vi_agent','vi_browser','vi_os','vi_device')) ) {
+ $sfl = '';
+}
?>
diff --git a/bbs/db_table.optimize.php b/bbs/db_table.optimize.php
index 828923029..97a2fd8fa 100644
--- a/bbs/db_table.optimize.php
+++ b/bbs/db_table.optimize.php
@@ -53,7 +53,7 @@ if($config['cf_leave_day'] > 0) {
}
// 음성 캡챠 파일 삭제
-$captcha_mp3 = glob(G5_PATH.'/data/cache/kcaptcha-*.mp3');
+$captcha_mp3 = glob(G5_DATA_PATH.'/cache/kcaptcha-*.mp3');
if($captcha_mp3 && is_array($captcha_mp3)) {
foreach ($captcha_mp3 as $file) {
if (filemtime($file) + 86400 < G5_SERVER_TIME) {
diff --git a/bbs/download.php b/bbs/download.php
index e4f7fa3fe..2b2aa1f2b 100644
--- a/bbs/download.php
+++ b/bbs/download.php
@@ -108,17 +108,17 @@ run_event('download_file_header', $file, $file_exist_check);
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
header("content-type: doesn/matter");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"$original\"");
header("content-transfer-encoding: binary");
} else if (preg_match("/Firefox/i", $_SERVER['HTTP_USER_AGENT'])){
header("content-type: file/unknown");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"".basename($file['bf_source'])."\"");
header("content-description: php generated data");
} else {
header("content-type: file/unknown");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"$original\"");
header("content-description: php generated data");
}
diff --git a/bbs/qadownload.php b/bbs/qadownload.php
index 3c1a838c0..b6f163ed7 100644
--- a/bbs/qadownload.php
+++ b/bbs/qadownload.php
@@ -22,21 +22,26 @@ if($is_guest) {
$filepath = G5_DATA_PATH.'/qa/'.$file['qa_file'.$no];
$filepath = addslashes($filepath);
-if (!is_file($filepath) || !file_exists($filepath))
+$file_exist_check = (!is_file($filepath) || !file_exists($filepath)) ? false : true;
+
+if ( false === run_replace('qa_download_file_exist_check', $file_exist_check, $file) ){
alert('파일이 존재하지 않습니다.');
+}
$g5['title'] = '다운로드 > '.conv_subject($file['qa_subject'], 255);
+run_event('qa_download_file_header', $file, $file_exist_check);
+
$original = urlencode($file['qa_source'.$no]);
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
header("content-type: doesn/matter");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"$original\"");
header("content-transfer-encoding: binary");
} else {
header("content-type: file/unknown");
- header("content-length: ".filesize("$filepath"));
+ header("content-length: ".filesize($filepath));
header("content-disposition: attachment; filename=\"$original\"");
header("content-description: php generated data");
}
diff --git a/bbs/write_update.php b/bbs/write_update.php
index 3f50cc96a..723cb7857 100644
--- a/bbs/write_update.php
+++ b/bbs/write_update.php
@@ -466,9 +466,9 @@ for ($i=0; $i
');
+define('G5_NO_PROFILE_IMG', ' ');
// 썸네일 처리 방식, 비율유지 하지 않고 썸네일을 생성하려면 주석을 풀고 값은 false 입력합니다. ( true 또는 주석으로 된 경우에는 비율 유지합니다. )
//define('G5_USE_THUMB_RATIO', false);
diff --git a/install/ajax.install.check.php b/install/ajax.install.check.php
index fd5616f73..a6fc82f2c 100644
--- a/install/ajax.install.check.php
+++ b/install/ajax.install.check.php
@@ -15,6 +15,10 @@ if (file_exists($dbconfig_file)) {
die(install_json_msg('프로그램이 이미 설치되어 있습니다.'));
}
+if (preg_match("/[^0-9a-z_]+/i", $_POST['table_prefix']) ) {
+ die(install_json_msg('TABLE명 접두사는 영문자, 숫자, _ 만 입력하세요.'));
+}
+
$mysql_host = safe_install_string_check($_POST['mysql_host'], 'json');
$mysql_user = safe_install_string_check($_POST['mysql_user'], 'json');
$mysql_pass = safe_install_string_check($_POST['mysql_pass'], 'json');
diff --git a/install/install_config.php b/install/install_config.php
index 468c89372..03d3f3e86 100644
--- a/install/install_config.php
+++ b/install/install_config.php
@@ -61,7 +61,7 @@ $ajax_token = md5($tmp_str.$_SERVER['REMOTE_ADDR'].$_SERVER['DOCUMENT_ROOT']);
TABLE명 접두사
- 가능한 변경하지 마십시오.
+ TABLE명 접두사는 영문자, 숫자, _ 만 입력 가능합니다.
diff --git a/install/install_db.php b/install/install_db.php
index 89e78a8ec..bd2a66acf 100644
--- a/install/install_db.php
+++ b/install/install_db.php
@@ -33,6 +33,10 @@ $admin_pass = $_POST['admin_pass'];
$admin_name = $_POST['admin_name'];
$admin_email = $_POST['admin_email'];
+if (preg_match("/[^0-9a-z_]+/i", $table_prefix) ) {
+ die('TABLE명 접두사는 영문자, 숫자, _ 만 입력하세요.
');
+}
+
if (preg_match("/[^0-9a-z_]+/i", $admin_id)) {
die('관리자 아이디는 영문자, 숫자, _ 만 입력하세요.
');
}
@@ -340,10 +344,10 @@ $f = @fopen($file, 'a');
fwrite($f, "); // 최대
$str = preg_replace("/\[\\]/i", "", $str);
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
+ $is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
?>
@@ -45,6 +47,7 @@ var char_max = parseInt(); // 최대- 삭제
@@ -45,6 +47,7 @@ var char_max = parseInt(); // 최대- 삭제
@@ -78,6 +80,7 @@ var char_max = parseInt(); // 최대- 삭제
@@ -45,6 +47,7 @@ var char_max = parseInt(); // 최대- 삭제
@@ -45,6 +47,7 @@ var char_max = parseInt(); // 최대- 삭제
@@ -78,6 +80,7 @@ var char_max = parseInt(); // 최대- 삭제