Repository navigation
fix(platform-wallet): own the shielded coordinator and wipe host rows inside Clear #5934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
PastaPastaPasta
wants to merge
4
commits into
v5.1-dev
Choose a base branch
from
fix/shielded-lifecycle-boundary
base: v5.1-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,345
−1,129
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
20f2680
fix(platform-wallet): own the shielded coordinator and wipe host rows…
PastaPastaPasta 1754d1a
fix(platform-wallet): admit private payment restorations and report a…
PastaPastaPasta 2352c3c
fix(platform-wallet): persist a pending host wipe and refuse shielded…
PastaPastaPasta 36e5549
fix(platform-wallet): refuse unconfigured shielded funding and wipe r…
PastaPastaPasta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Blocking: Do not report a successful wipe while unclassified shielded rows remain
The host callback enumerates only wallet metadata rows whose
networkRawmatches the requested network.networkRawis nullable while metadata is being completed, and the shielded tables have no wallet foreign key, so viewing keys, notes, sync state, or activity can exist for a wallet that is absent from this query or still has a null network. The callback then returns success while those rows remain and Clear reports success. A later metadata write can make the surviving rows eligible for restoration, defeating Clear. Classify unresolved or buffered wallet metadata before wiping, or fail closed when any shielded rows cannot be assigned to the requested network. The Swift handler has the same selection defect.Raised on code unchanged since the last review, and confirmed by an independent pass: If a shielded row exists for wallet W while W has no wallet metadata row or its networkRaw is null, clearShielded(N) makes both handlers enumerate no W, yet they return success. The native reset therefore completes while W's viewing key, notes, sync state, or activity remain; if W's metadata is later completed with network N, those rows become restorable on a later load and defeat Clear.
source:
gpt-6.1-sol(phase2-reviewer: security-auditor)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 2352c3c, in both the Kotlin and Swift handlers. They now enumerate wallet ids from the shielded tables themselves:
Failing closed on that last case would block shielded use permanently, because no network-locked manager can ever load such a wallet.
🤖 Posted autonomously by Claude on behalf of pasta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved (re-reviewed at
2352c3c6): Both managed-language handlers now enumerate shielded rows directly, delete orphan rows, and refuse the wipe when a wallet's network is still unknown.