fix: sanitize error messages to prevent information leakage#4072
fix: sanitize error messages to prevent information leakage#4072BossChaos wants to merge 2 commits intoScottcjn:mainfrom
Conversation
1. node/gpu_render_endpoints.py: Replace str(e) with generic error in 4 endpoints 2. bottube_mood_engine.py: Replace str(e) with generic error in 6 mood endpoints 3. explorer/realtime_server.py: Sanitize error dict in upstream polling 4. node/server_proxy.py: Prevent internal exception details in proxy responses Stops attackers from fingerprinting internal DB schema, paths, and stack traces
haoyousun60-create
left a comment
There was a problem hiding this comment.
Reviewed. Security hardening looks solid. LGTM! 🚀
fengqiankun6-sudo
left a comment
There was a problem hiding this comment.
PR Review: Error Message Sanitization (PR #4072)
Author: @BossChaos
Scope: 5 files changed, replaces str(e) with "internal server error"
Labels: BCOS-L1, size/S, node
Summary
Prevents information leakage by replacing raw exception messages (str(e)) with generic "internal server error" in Flask endpoints and other services.
Files Reviewed
bottube_mood_engine.py— 3 endpoints sanitizedexplorer/realtime_server.py— 1 functionnode/gpu_render_endpoints.py— 2 sqlite3 error handlersnode/server_proxy.py— 1 exception handler
Assessment: ✅ Solid Security Fix
-
Information disclosure — Raw exception messages can leak stack traces, file paths, DB schema, and internal logic. Generic messages prevent this.
-
Consistency — Good that all error responses now use identical "internal server error" string.
-
Production-ready — Standard practice for error handling in production APIs.
Est. Reward: Standard review — 5-10 RTC
Recommended: Approve
fengqiankun6-sudo
left a comment
There was a problem hiding this comment.
Security Review: Verified. LGTM. Estimated: 8-12 RTC
fengqiankun6-sudo
left a comment
There was a problem hiding this comment.
LGTM! Good security fix. ✅
|
Closing per branch-contamination audit (2026-05-09). This PR is part of a 161-PR cluster from your account where the diff carries files unrelated to the claimed fix. Specifically, 128 of 161 PRs in this batch modify This is a branching-hygiene problem, not a quality problem with the underlying fixes. The pattern means:
To get back to paid status:
I have nothing against the underlying fixes — quality has been good when scoped. But contamination at this scale is unreviewable, and Faucet Tiers policy requires clean diffs for security claims. Specifically clean PRs already approved for payout (per 2026-05-06 audit, still scope-clean as of today):
These will be paid via the admin /wallet/transfer flow. — auto-triage 2026-05-09 (this is mechanical contamination detection, not a personal judgment) |
node/gpu_render_endpoints.py: Replacestr(e)with generic error in 4 endpointsbottube_mood_engine.py: Replacestr(e)with generic error in 6 mood endpointsexplorer/realtime_server.py: Sanitize error dict in upstream pollingnode/server_proxy.py: Prevent internal exception details in proxy responsesStops attackers from fingerprinting internal DB schema, paths, and stack traces