Repository navigation
fix(passkey): consume challenges atomically and honor configured RP IDs - #997
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe passkey router now derives an RP ID from the configured origin when none is set. Challenge consumption now uses a conditional delete and returns HTTP 400 unless exactly one matching, unexpired challenge is deleted. ChangesPasskey router
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The passkey changes consume challenges atomically and retain the dashboard request’s actual origin. No identified behavior blocks merging. Pre-merge checks |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
…a3d2d2fe2 Checked with git ls-remote on 2026-10-12 15:36 UTC; panel main and every tag and release are unchanged. Panel dev, six commits after 0c869b0: - fd5e95e (PasarGuard#997, passkey challenge consumed by one conditional DELETE, configured RP ID honoured), 92acbae (subscription pages escaped, markup rejected in host addresses) and 0c9b1e5 (PasarGuard#1001, an unknown admin filter no longer falls back to global statistics) are queued security: yes, each with the fork lines it affects and its fixer: PG-UP-PASSKEY997, PG-UP-SUBESC and PG-UP-STATS1001. - 3ec5635 (PasarGuard#998, an omitted next_plan no longer deletes the user's next plan) is queued security: no until 2026-10-19 as billing data loss. - 63f9915 and 79f04fe (Xray WireGuard inbound validation and its lint suppressions) are queued security: no with PasarGuard#996. - 785c5f2 is recorded as ported by design: its pick bd264a6 is whole, and the one removed line the pick check now flags is the fork's select-then-delete in _consume_challenge, which fd5e95e replaces. - The masque branch moved to fa5dfc2 (359c8cf MASQUE settings and a merge of dev); both are unmerged work, waived while unmerged. - The 1c25036 entry now names all three remaining dangerouslySetInnerHTML uses, including terminal-line.tsx:66. - The chart and HWID queue lines name their porting branches. Node dev, two commits after e03754dec: PasarGuard#101 (a3d2d2fe2, forward accept rules kept out of mangle chains) is queued security: no until 2026-10-19 for both the WireGuard and the L2TP copy of ensureNFTForwarding, and PasarGuard#102 (36dc7a4a7, removes .gitlab-ci.yml) is already true of the fork. Against live upstream the panel gate fails only on the 22 port-queue commits classified security: yes, and the forks gate only on node f72ac0efacdb.
…Ds (PasarGuard#997) (cherry picked from commit fd5e95e)
Summary
PASSKEY_RP_IDeven whenPASSKEY_ORIGINis unset. Verification continues to use the dashboard's actual origin, with the existing fallback for unrelated hosts.Type of change
Checklist
Testing
pytest tests/api/test_admin.py tests/api/test_permissions.py -q: 68 passed using a shared temporary SQLite database for the application and test sessions.ruff check --no-fix app/routers/passkey.pyandgit diff --check: passed.Screenshots
Not applicable; no UI changes.
Notes for reviewers
Only
app/routers/passkey.pychanges. No test, documentation, dependency, or migration files are included.Summary by CodeRabbit