Skip to content

walletapi/rpc: do not return panic stack traces to callers - #68

Open
DHEBP wants to merge 1 commit into
DEROFDN:community-devfrom
DHEBP:fix/walletapi-rpc-disclosure
Open

walletapi/rpc: do not return panic stack traces to callers#68
DHEBP wants to merge 1 commit into
DEROFDN:community-devfrom
DHEBP:fix/walletapi-rpc-disclosure

Conversation

@DHEBP

@DHEBP DHEBP commented Aug 12, 2026

Copy link
Copy Markdown

What

The walletapi/rpcserver handlers formatted debug.Stack() into the returned error on panic recovery, so a panic surfaced the wallet binary's absolute path and OS username to the RPC caller.

Change

The 10 wallet RPC handlers now log the stack at V(1) and return a generic internal error, mirroring the daemon-side handlers. Stack traces remain in the node's own logs.

Notes

  • The wallet RPC server is opt-in (--rpc-server) and binds localhost by default, so exposure is lower than the daemon side — this is hygiene / consistency.
  • No consumer parses these error bodies (checked wallet / tools / tests).
  • Same disclosure class as the daemon-side handler change.

The wallet RPC handlers formatted debug.Stack() into the returned error
on panic recovery, exposing the wallet binary's absolute path and OS
username to the RPC caller. Log the stack at V(1) and return a generic
error, matching the daemon RPC handlers.
@DHEBP
DHEBP force-pushed the fix/walletapi-rpc-disclosure branch from 0d740d2 to c63a7af Compare August 16, 2026 23:44
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