Skip to content

Commit

Permalink
[Web] escape html of alert messages
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddleSpl0it committed Apr 4, 2024
1 parent cd24057 commit cf2fda6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/web/inc/footer.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
$alerts = [];
if (is_array($alertbox_log_parser)) {
foreach ($alertbox_log_parser as $log) {
$message = strtr($log['msg'], ["\n" => '', "\r" => '', "\t" => '<br>']);
$message = htmlspecialchars($log['msg'], ENT_QUOTES);
$message = strtr($message, ["\n" => '', "\r" => '', "\t" => '<br>']);
$alerts[trim($log['type'], '"')][] = trim($message, '"');
}
$alert = array_filter(array_unique($alerts));
Expand Down

0 comments on commit cf2fda6

Please sign in to comment.