Skip to content

Commit

Permalink
Escape error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval authored Sep 18, 2024
1 parent 5013ad1 commit 1538a01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Glpi/Application/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ private function outputDebugMessage(string $error_type, string $message, string
$this->output_handler->writeln($message, $verbosity);
} else if (!isCommandLine()) {
echo '<div class="alert alert-important alert-danger glpi-debug-alert" style="z-index:10000">'
. '<span class="b">' . $error_type . ': </span>' . $message . '</div>';
. '<span class="b">' . \htmlspecialchars($error_type) . ': </span>' . \htmlspecialchars($message) . '</div>';
} else {
echo $error_type . ': ' . $message . "\n";
}
Expand Down

0 comments on commit 1538a01

Please sign in to comment.