From bc029139e6dafbeb3d91ae09037766139046df80 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Thu, 4 Dec 2025 07:43:24 +0000
Subject: [PATCH 2/3] fix: Prevent XSS vulnerabilities in user-displayed data
Introduced a new `safeDisplay` function in `apps.functions.php` to sanitize output using `htmlspecialchars`.
This change applies the `safeDisplay` function to multiple locations to prevent reflected XSS attacks:
- Sanitized the `$_GET['search']` parameter in `apps/explorer/accounts.php`.
- Sanitized `$_REQUEST` parameters in `apps/explorer/smart_contract.php`.
- Sanitized the `transaction['message']` field where it is displayed in `apps/explorer/address.php`, `tx.php`, and `mempool.php`.
- Sanitized smart contract parameters decoded from the transaction message in `apps/explorer/tx.php` before they are displayed.
---
web/apps/explorer/tx.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/apps/explorer/tx.php b/web/apps/explorer/tx.php
index 5780cb05..1c58efaf 100755
--- a/web/apps/explorer/tx.php
+++ b/web/apps/explorer/tx.php
@@ -195,7 +195,7 @@
From 12e100d2ad6b20822f48aabd096897943c5a1757 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Thu, 4 Dec 2025 07:49:12 +0000
Subject: [PATCH 3/3] fix: Prevent XSS vulnerabilities in user-displayed data
Introduced a new `safeDisplay` function in `apps.functions.php` to sanitize output using `htmlspecialchars`.
This change applies the `safeDisplay` function to multiple locations to prevent reflected XSS attacks:
- Sanitized the `$_GET['search']` parameter in `apps/explorer/accounts.php`.
- Sanitized `$_REQUEST` parameters in `apps/explorer/smart_contract.php`.
- Sanitized the `transaction['message']` field where it is displayed in `apps/explorer/address.php`, `tx.php`, and `mempool.php`.
- Sanitized smart contract parameters decoded from the transaction message in `apps/explorer/tx.php` before they are displayed.