security: SVG 및 SVGZ 파일 업로드 차단

게시판, 1:1문의, 폼메일 및 쇼핑몰 설정의 클라이언트와 서버 검증에서 SVG 계열 파일 업로드를 거부한다.
This commit is contained in:
whitedot committed 2026-09-01 11:40:15 +09:00
1 parent 4e8474f231
commit 0242e8f1a3
7 files changed
+156 -5

No files matched your search

+9
View File
@@ -137,6 +137,15 @@ for ($i=1; $i<=10; $i++) {
}
}
if (isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) {
foreach ($_FILES['bf_file']['name'] as $filename) {
$filename = get_safe_filename($filename);
if (is_disallowed_svg_filename($filename)) {
alert('허용되지 않는 파일 확장자입니다. (svg, svgz)');
}
}
}
@include_once($board_skin_path.'/write_update.head.skin.php');
run_event('write_update_before', $board, $wr_id, $w, $qstr);