Merge branch 'g5'
This commit is contained in:
@ -32,6 +32,9 @@ $msg2 = str_replace("\\n", "<br>", $msg);
|
|||||||
|
|
||||||
if (!$url) $url = $_SERVER['HTTP_REFERER'];
|
if (!$url) $url = $_SERVER['HTTP_REFERER'];
|
||||||
|
|
||||||
|
// url 체크
|
||||||
|
check_url_host($url);
|
||||||
|
|
||||||
if($error) {
|
if($error) {
|
||||||
$header2 = "다음 항목에 오류가 있습니다.";
|
$header2 = "다음 항목에 오류가 있습니다.";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
|
// url 체크
|
||||||
|
check_url_host($url1);
|
||||||
|
check_url_host($url2);
|
||||||
|
check_url_host($url3);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -6,12 +6,8 @@ include_once('./_head.sub.php');
|
|||||||
|
|
||||||
$url = $_GET['url'];
|
$url = $_GET['url'];
|
||||||
|
|
||||||
$p = parse_url($url);
|
// url 체크
|
||||||
if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) {
|
check_url_host($url);
|
||||||
//print_r2($p);
|
|
||||||
if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST'])
|
|
||||||
alert('url에 타 도메인을 지정할 수 없습니다.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 이미 로그인 중이라면
|
// 이미 로그인 중이라면
|
||||||
if ($is_member) {
|
if ($is_member) {
|
||||||
|
|||||||
@ -65,6 +65,9 @@ if ($auto_login) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($url) {
|
if ($url) {
|
||||||
|
// url 체크
|
||||||
|
check_url_host($url);
|
||||||
|
|
||||||
$link = urldecode($url);
|
$link = urldecode($url);
|
||||||
// 2003-06-14 추가 (다른 변수들을 넘겨주기 위함)
|
// 2003-06-14 추가 (다른 변수들을 넘겨주기 위함)
|
||||||
if (preg_match("/\?/", $link))
|
if (preg_match("/\?/", $link))
|
||||||
|
|||||||
@ -2859,4 +2859,26 @@ function check_password($pass, $hash)
|
|||||||
|
|
||||||
return ($password === $hash);
|
return ($password === $hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 동일한 host url 인지
|
||||||
|
function check_url_host($url, $msg='', $return_url=G5_URL)
|
||||||
|
{
|
||||||
|
if(!$msg)
|
||||||
|
$msg = 'url에 타 도메인을 지정할 수 없습니다.';
|
||||||
|
|
||||||
|
$p = parse_url($url);
|
||||||
|
if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) {
|
||||||
|
if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST']) {
|
||||||
|
echo '<script>'.PHP_EOL;
|
||||||
|
echo 'alert("url에 타 도메인을 지정할 수 없습니다.");'.PHP_EOL;
|
||||||
|
echo 'document.location.href = "'.$return_url.'";'.PHP_EOL;
|
||||||
|
echo '</script>'.PHP_EOL;
|
||||||
|
echo '<noscript>'.PHP_EOL;
|
||||||
|
echo '<p>'.$msg.'</p>'.PHP_EOL;
|
||||||
|
echo '<p><a href="'.$return_url.'">돌아가기</a></p>'.PHP_EOL;
|
||||||
|
echo '</noscript>'.PHP_EOL;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user