그누보드, 영카트 다중 취약점 (18-062, 092, 101, 102) 수정
This commit is contained in:
@ -18,18 +18,18 @@ $_POST['bo_include_head'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_incl
|
||||
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
|
||||
|
||||
if ($file = $_POST['bo_include_head']) {
|
||||
$purl = parse_url($file);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
}
|
||||
$_POST['bo_include_head'] = $file;
|
||||
}
|
||||
|
||||
if ($file = $_POST['bo_include_tail']) {
|
||||
$purl = parse_url($file);
|
||||
$file = $purl['path'];
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
}
|
||||
$_POST['bo_include_tail'] = $file;
|
||||
|
||||
Reference in New Issue
Block a user