diff --git a/g4_import.php b/g4_import.php index 85e763858..3e4f67ac2 100644 --- a/g4_import.php +++ b/g4_import.php @@ -125,6 +125,7 @@ if($is_admin != 'super')

프로그램을 실행하시려면 그누보드4의 config.php 파일 경로를 입력하신 후 확인을 클릭해 주십시오.

+
@@ -142,6 +143,10 @@ if($is_admin != 'super') diff --git a/g4_import_run.php b/g4_import_run.php index 28c949931..f34569b93 100644 --- a/g4_import_run.php +++ b/g4_import_run.php @@ -17,6 +17,13 @@ echo ''; if(empty($_POST)) alert('올바른 방법으로 이용해 주십시오.', G5_URL); +if (!preg_match("/^http['s']?:\/\/".$_SERVER['HTTP_HOST']."/", $_SERVER['HTTP_REFERER'])){ + alert("제대로 된 접근이 아닌것 같습니다.", G5_URL); +} + +// 토큰체크 +check_write_token('g4_import'); + if(get_session('tables_copied') == 'done') alert('DB 데이터 변환을 이미 실행하였습니다. 중복 실행시 오류가 발생할 수 있습니다.', G5_URL); @@ -165,7 +172,7 @@ document.onkeydown = noRefresh ; flush(); // g4의 confing.php - require($g4_config_file); + require('./'.$g4_config_file); if(preg_replace('/[^a-z]/', '', strtolower($g4['charset'])) == 'euckr') $is_euckr = true;