π‘οΈ Sentinel: [HIGH] Fix internal RPC error leakage#58
Conversation
Replaced instances where internal RPC errors (like connection timeouts or specific backend daemon failures) were sent directly to end users via `message.reply(err.message)`. This exposes backend infrastructure details and internal errors to potentially malicious users.
Changes:
- Replaced `message.reply(err.message)` with generic `message.reply('An internal error occurred.')`.
- Added server-side logging using `console.error(err)` to ensure admins and developers can still trace and debug failures.
- Added a `.catch(() => {})` clause to `message.delete()` promise chains to prevent `UnhandledPromiseRejection` errors which crash the node process.
- Formatted modified files using Prettier.
Co-authored-by: DerUntote <8378077+DerUntote@users.noreply.github.com>
|
π 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: HIGH
π‘ Vulnerability: Information Exposure. Internal daemon and network connection errors from the
bitcoind-rpcclient were being passed directly into Discord channels.π― Impact: Exposing raw backend errors can leak internal routing paths, configuration specifics, or infrastructure details that an attacker could use for reconnaissance.
π§ Fix: Intercepted RPC errors by logging them to
console.errorand sending a generic, safe response to the Discord user ('An internal error occurred.'). Also attached.catch()blocks to discord message deletion promises to fail safely and prevent process crashes.β Verification: Verify that
message.reply(err.message)has been eradicated from all*Tipper.jsfiles viagrep -r 'message.reply(err.message)' bot/modules/. Ensure tests/syntax are clean viafor file in bot/modules/*Tipper.js; do node -c "$file"; done.PR created automatically by Jules for task 13907850235070065544 started by @DerUntote