From d590fafd6cb5aefc36a25610a3803cbadeca08c4 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Wed, 3 Jun 2026 19:01:17 +0200 Subject: [PATCH] Fix indent and comment --- init/log_parser.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init/log_parser.pl b/init/log_parser.pl index feadff3e3..34648c164 100755 --- a/init/log_parser.pl +++ b/init/log_parser.pl @@ -9,14 +9,14 @@ sub parse_webmin_log { local ($user, $script, $action, $type, $object, $p) = @_; -# User unit names and owners can come from user-controlled home directories, so -# escape them before inserting into the log viewer HTML. +# This parser returns HTML fragments, so escape log values before wrapping them +# in UI tags or translated strings. if ($type eq 'systemd-user' && ($action eq 'modify' || $action eq 'create' || $action eq 'delete' || $action eq 'status' || $action eq 'logs' || $action eq 'massstart' || $action eq 'massstop' || $action eq 'massrestart' || $action eq 'massenable' || - $action eq 'massdisable' || $action eq 'linger')) { + $action eq 'massdisable' || $action eq 'linger')) { if ($action eq 'linger') { return &text('log_user_linger', &ui_tag('tt', &html_escape($p->{'user'})), @@ -79,7 +79,7 @@ elsif ($action eq 'massstart' || $action eq 'massstop' || split(/\s+/, $object))); } elsif ($action eq 'telinit') { - return &text('log_telinit', $object); + return &text('log_telinit', &html_escape($object)); } else { return;