Skip to content

Conversation

@google-labs-jules
Copy link

This commit provides a comprehensive fix for multiple Cross-Site Scripting (XSS) vulnerabilities. A shared safeDisplay function was created to sanitize all output using htmlspecialchars. This function was then applied to every identified location where user-provided data—including transaction messages, smart contract parameters, and URL parameters—is displayed back to the user. This ensures that any malicious scripts are properly escaped and not executed in the user's browser.


PR created automatically by Jules for task 14936323345649994863 started by @attogram

Introduced a new `safeDisplay` function in `apps.functions.php` to sanitize output using `htmlspecialchars`.

This comprehensive change applies the `safeDisplay` function to all identified locations where user-provided data is displayed to prevent reflected XSS attacks:

- Sanitized the `$_GET['search']` parameter in `apps/explorer/accounts.php`.
- Sanitized `$_REQUEST` parameters and the `id` from `$_GET` 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.
- Sanitized the `transaction['message']` field on the admin mempool page in `apps/admin/tabs/mempool.php`.
- Sanitized the `address` and `type` GET parameters in `apps/explorer/address_info.php`.
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant