From 7391d23487f32da31d39b1c5e1b46908693e325d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 3 May 2026 23:44:57 +0000 Subject: [PATCH] fix: address code review - add sanitizer comments, fix strrpos false-return edge case Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/1afce49e-510d-49a6-9d11-0b7118d3cf85 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> --- modules/config_games/config_servers.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/config_games/config_servers.php b/modules/config_games/config_servers.php index ee387950..0e4d15ce 100644 --- a/modules/config_games/config_servers.php +++ b/modules/config_games/config_servers.php @@ -185,6 +185,14 @@ function config_games_script_node_names(): array * CDATA section so the file becomes well-formed. Non-script elements are left * untouched. * + * Assumptions / limitations: + * - Script elements are treated as leaf nodes (no child elements expected). + * Nested XML tags inside a script block are not supported and the regex + * will not handle them correctly. + * - The detection of an already-present CDATA section relies on the opening + * tag being immediately followed by '