From e29b8d4defbdd0239dbe083799e25680ad6fcff6 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 15:41:55 +0530 Subject: [PATCH] refactor: sanitize dynamic outputs to prevent reflected xss --- include/client/accesslink.inc.php | 4 ++-- include/client/login.inc.php | 6 +++--- include/staff/dashboard.inc.php | 2 +- include/staff/templates/org-profile.tmpl.php | 12 ++++++------ include/staff/templates/task-view.tmpl.php | 6 ++---- include/staff/ticket-open.inc.php | 6 +++--- include/staff/ticket-view.inc.php | 2 +- open.php | 8 ++++++-- 8 files changed, 24 insertions(+), 22 deletions(-) diff --git a/include/client/accesslink.inc.php b/include/client/accesslink.inc.php index 4f5f5ac810..0b4f82adb9 100644 --- a/include/client/accesslink.inc.php +++ b/include/client/accesslink.inc.php @@ -25,12 +25,12 @@
+ name="lemail" size="30" value="" class="nowarn">
+ size="30" value="" class="nowarn">

diff --git a/include/client/login.inc.php b/include/client/login.inc.php index 98e9feac29..6ada33ecd7 100644 --- a/include/client/login.inc.php +++ b/include/client/login.inc.php @@ -23,10 +23,10 @@

- +
- +

@@ -55,7 +55,7 @@

- — +
diff --git a/include/staff/dashboard.inc.php b/include/staff/dashboard.inc.php index 94e52e7fff..39f8f1f84f 100644 --- a/include/staff/dashboard.inc.php +++ b/include/staff/dashboard.inc.php @@ -175,7 +175,7 @@ $(this).removeAttr('selected'); // Set the selected period by the option's value (periods equal // option's values) - if ($(this).val() == "end; ?>") + if ($(this).val() == "end); ?>") $(this).attr("selected","selected"); }); diff --git a/include/staff/templates/org-profile.tmpl.php b/include/staff/templates/org-profile.tmpl.php index c430f7d7ba..da71e34791 100644 --- a/include/staff/templates/org-profile.tmpl.php +++ b/include/staff/templates/org-profile.tmpl.php @@ -4,14 +4,14 @@ if (!$info['title']) $info['title'] = Format::htmlchars($org->getName()); ?> -

+


%s

', $info['error']); + echo sprintf('

%s

', htmlspecialchars($info['error'], ENT_QUOTES, 'UTF-8')); } elseif ($info['msg']) { - echo sprintf('

%s

', $info['msg']); + echo sprintf('

%s

', htmlspecialchars($info['msg'], ENT_QUOTES, 'UTF-8')); } ?>