Open
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by gpt-5.4-2026-03-05 · 393,916 tokens |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Pentest L2 identified archived Wayback Machine URLs where magic-link verification links exposed both login tokens and user email addresses in the query string. This PR keeps the existing magic-link token model but removes email PII from generated verification URLs and reduces future leakage paths.
L2: Magic-link URL privacy
/auth/verify-magic-link?token=...&email=...URLs. If email clients, browser tooling, analytics, or archive crawlers observe the URL, the email address becomes permanently visible in external URL logs/archives.emailquery parameter from generated magic-link URLs. The token already maps to the email inmagic_link_tokens, so the credentials provider now verifies the token and derives the user email from the consumed token row.email=. This avoids reintroducing browser-visible email query strings after the initial magic-link URL has been scrubbed.signin_hintlocalStorage record. That keeps same-browser returning-user and SSO prefill behavior without sending email through server-generated URLs.token,email,callbackUrl,code,state) and drops all query params for/auth/verify-magic-linkbefore sending$current_url.Disallow: /auth/verify-magic-linktorobots.txtand setsCache-Control: no-storeplusX-Robots-Tag: noindex, noarchive, nofollowon the verification route.30 minutes, matching the token default instead of saying24 hours.This is intentionally separate from #2352 so the Wayback/magic-link remediation can be reviewed, deployed, and rolled back independently.
Verification
.plans/pentest-findings.mdfor code-related L1 scope./api/userreturning401after revocation with stale cookie, re-login after revocation, and stale admin route rejection for/admin/api/credit-categories.Visual Changes
N/A
Reviewer Notes
Code Reviewer Notes
verifyAndConsumeMagicLinkTokenalready returns the DB row with email, so removing the client-supplied email avoids redundant PII without changing the token trust boundary.signin_hintpreserves same-browser prefill without URL PII.