Skip to content

fix(api): validate xpubs before dropping wallet from memory - #6

Closed
feafel wants to merge 1 commit into
UTEXO-Protocol:mainfrom
feafel:fix/drop-validates-xpubs
Closed

feafel wants to merge 1 commit into
UTEXO-Protocol:mainfrom
feafel:fix/drop-validates-xpubs

Conversation

@feafel

@feafel feafel commented Oct 11, 2026

Copy link
Copy Markdown

Every endpoint routes through derive_wctx() (re-register + validate the xpub pair against the fingerprint) — except drop, which evicted by bare 4-byte master fingerprint alone. Anyone presenting a fingerprint could evict someone else's in-memory wallet, forcing a full re-register + resync and breaking in-flight begin/end flows.

One-hunk fix: route drop through derive_wctx like the rest. Pattern is identical to neighboring endpoints; rustfmt --check clean on the hunk. Full cargo test could not run here (private rgb-*-s-bfa deps need repo access) — requesting CI.

drop() evicted by bare master fingerprint alone, skipping the
derive_wctx() re-register + validation every other endpoint performs.
Anyone presenting a 4-byte fingerprint could evict someone else's
in-memory wallet, forcing full re-register + resync and breaking
in-flight begin/end flows. Route drop through derive_wctx like the rest.
@gofman8 gofman8 closed this Oct 27, 2026
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.

2 participants