그누보드 다중 취약점 (17-0295, 334, 355) 수정
This commit is contained in:
@ -10,12 +10,28 @@ check_admin_token();
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
if( $qa_include_head && ! is_include_path_check($qa_include_head) ){
|
||||
if( $qa_include_head ){
|
||||
$purl = parse_url($qa_include_head);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if( $qa_include_tail ){
|
||||
$purl = parse_url($qa_include_tail);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if( $qa_include_head && ! is_include_path_check($qa_include_head, 1) ){
|
||||
$qa_include_head = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
if( $qa_include_tail && ! is_include_path_check($qa_include_tail) ){
|
||||
if( $qa_include_tail && ! is_include_path_check($qa_include_tail, 1) ){
|
||||
$qa_include_tail = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user