안전하지 않는 사이트 리다이렉션 취약점 수정

This commit is contained in:
chicpro
2015-05-18 17:29:01 +09:00
parent d701f840db
commit 0835753299
5 changed files with 34 additions and 6 deletions

View File

@ -6,12 +6,8 @@ include_once('./_head.sub.php');
$url = $_GET['url'];
$p = parse_url($url);
if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) {
//print_r2($p);
if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST'])
alert('url에 타 도메인을 지정할 수 없습니다.');
}
// url 체크
check_url_host($url);
// 이미 로그인 중이라면
if ($is_member) {