Route background NIP-55 pubkey verification through shared checkPubkey helper - #509
Conversation
|
Warning Review limit reached
Next review available in: 49 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Verified on a Pixel 9a running Android 17: full device suite 291 tests, 0 failures, 5 skipped, matching the The dedup is behavior-preserving, which is the thing worth checking carefully here since this is the one place the app catches a handler returning a pubkey that is not the user's. I compared the removed inline block against Both production paths now go through the one helper ( Collapsing the three distinct One thing to settle before merging:
|
|
Thanks @kwsantiago — agreed on all points, and thanks for the branch-by-branch check on the fail-closed path. Settled the The decision is written down as you suggested: the NIP-55 self-verification stays in Kotlin and we're declining the Rust relocation, because the independent second source ( No code changes; ready to merge. |
Routes the background NIP-55 pubkey verification (Nip55ContentProvider) through the same
checkPubkeyhelper the foreground path uses, removing the last inline copy of the self-verification block.Behavior-preserving dedup:
checkPubkeystill receives agroupPubkeyread independently from keystore share metadata, so the independent-second-source property that makes the check meaningful is preserved. Same non-GET_PUBLIC_KEY skip, same empty-result rejection, same fail-closed on null/empty stored pubkey, same hex encoding, same constant-timeMessageDigest.isEqual.Relates to #414 — see that issue for the decision to keep the check in Kotlin rather than relocating into Rust.