[security]KVE-2026-0787 alert() JavaScript 이스케이프 누락 Stored XSS 수정

bbs/alert.php, bbs/alert_close.php 가 alert("$msg") 형태로 메시지를
JS 문자열 컨텍스트에 직접 삽입하던 부분을 수정. lib/common.lib.php 에
PHP 5.2 호환 폴백을 갖춘 get_js_safe_string() 헬퍼를 추가하고,
호출부에는 function_exists 가드를 걸어 부분 패치 환경에서도 안전하게
폴백되도록 함.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
thisgunandClaude Opus 4.7 committed 2026-05-26 03:31:24 +00:00
1 parent 7119b4f612
commit 3de722d3df
3 files changed
+36 -2

No files matched your search

+1 -1
View File
@@ -48,7 +48,7 @@ if($error) {
?>
<script>
alert("<?php echo $msg; ?>");
alert(<?php echo function_exists('get_js_safe_string') ? get_js_safe_string($msg) : '""'; ?>);
<?php if ($url) { ?>
document.location.replace("<?php echo str_replace('&amp;', '&', $url); ?>");
<?php } else { ?>