René's URL Explorer Experiment


Title: id(directory_auth): pending email codes are never evicted — the codes map keeps every expired code whose address never comes back · Issue #1732 · developing-today/code · GitHub

Open Graph Title: id(directory_auth): pending email codes are never evicted — the codes map keeps every expired code whose address never comes back · Issue #1732 · developing-today/code

X Title: id(directory_auth): pending email codes are never evicted — the codes map keeps every expired code whose address never comes back · Issue #1732 · developing-today/code

Description: Problem DirectoryAuth's pending email-code map grows forever: an entry is only ever removed when that same address comes back to check_code (or re-issues after the resend minute). A code that is issued and never checked — the normal case...

Open Graph Description: Problem DirectoryAuth's pending email-code map grows forever: an entry is only ever removed when that same address comes back to check_code (or re-issues after the resend minute). A code that is is...

X Description: Problem DirectoryAuth's pending email-code map grows forever: an entry is only ever removed when that same address comes back to check_code (or re-issues after the resend minute). A code that i...

Opengraph URL: https://github.com/developing-today/code/issues/1732

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(directory_auth): pending email codes are never evicted — the codes map keeps every expired code whose address never comes back","articleBody":"## Problem\n\n`DirectoryAuth`'s pending email-code map grows forever: an entry is only ever removed when that same address comes back to `check_code` (or re-issues after the resend minute). A code that is issued and never checked — the normal case for a mistyped address, an abandoned sign-in, or a bot probing many addresses — stays in the map for the life of the process, long past its 15-minute expiry.\n\n## Evidence (verified this run on main `8c8d1bbb`, line trace)\n\n- `pkgs/id/src/directory_auth.rs:112` — `codes: HashMap\u003cString, PendingCode>`, keyed by address.\n- `pkgs/id/src/directory_auth.rs:157-179` — `issue_code` inserts/overwrites one entry per address; it never sweeps expired entries for other addresses.\n- `pkgs/id/src/directory_auth.rs:186-200` — `check_code` is the only place an entry is removed (on success, on expiry, or on exhausted attempts) — and only for the address being checked.\n- `pkgs/id/src/directory_auth.rs:27` — `CODE_TTL_MS = 15 * 60 * 1000`: entries are dead after 15 minutes but are retained indefinitely.\n- The neighbouring maps in the same file DO sweep, so the omission is an asymmetry, not a design rule: sessions are swept in `open_session` (`directory_auth.rs:118`, `retain(|_, record| record.expires_at > now)`), and the signed-request replay guard sweeps in `accept` (`directory_auth.rs:250`, retain on `SIGNED_WINDOW_MS`).\n- Callers: `pkgs/id/src/directory_view.rs:1219` (confirm) and `:1244` (sign-in) call `issue_code` for an address supplied in the request, so distinct addresses accumulate entries at request rate; nothing else touches the map (grep over `src/` for `issue_code`/`check_code`/`.codes` — only `directory_auth.rs` and those two call sites).\n\n## Why it matters\n\nThis is a long-lived server process (a hosted world). The map grows by one entry per distinct address that ever requests a code and does not complete the flow, with no bound and no eviction — the same unbounded-growth class as #1713 (SaveRateLimiter) and #1730 (WaitingPool arrived set), but in the auth surface, where an unauthenticated caller controls the key (the email address). It also contradicts the module's own framing (`directory_auth.rs:5-7`): pending codes are supposed to live only until \"its time is up\".\n\n## Suggested direction (for triage to pin)\n\nMirror the session sweep: retain only unexpired entries when `issue_code` runs (it already receives `now`), and/or sweep at the top of `check_code`. Keep behaviour otherwise identical: the resend-minute rule, the 5-attempt cap, and the digest-only storage all stay.\n\n## Acceptance criteria\n\n- [ ] After a code's 15-minute expiry, its entry is evicted without that address ever calling `check_code` (unit test: issue for address A, advance the clock past expiry, issue/check for address B, assert A's entry is gone — e.g. via the map's observable size or a re-issue behaving as a fresh entry).\n- [ ] Unexpired codes still verify, the 60-second resend refusal still applies, and the 5-attempt exhaustion still removes the entry.\n- [ ] Issue/check behaviour for live codes is unchanged; existing `directory_auth` tests still pass (laptop or CI).\n\n## Dedup\n\nSearched open + closed issues and code search for `DirectoryAuth`, `issue_code`, and pending-code/expiry terms before filing: no filing covers this map. #1713/#1726/#1730 are the same unbounded-growth class in other components (web save limiter, outbox, waiting pool), not this one.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-28T16:48:23Z","url":"https://github.com/developing-today/code/issues/1732"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d33d306e-82c6-8297-9dc3-cd6635eca476
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD3C0:5F360:360C4F:46E7AB:6B06178E
html-safe-nonce772a7e3431c6da6c61ab717b792100a022576a7874217dd3c490b9a2d36e6b4c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0MwOjVGMzYwOjM2MEM0Rjo0NkU3QUI6NkIwNjE3OEUiLCJ2aXNpdG9yX2lkIjoiODA4MjQwMjgzMTAyNzgwNDA0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb39f144e591a3dc05bc32d19ec95bb8806d9b6d655261f019147d0f7ef583dc1
hovercard-subject-tagissue:6083446046
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/1732/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ca9a1fc1cb20af63f1d9ebf90818d6f7310a7f7f0541b74c504595ee9ac3fbc1/developing-today/code/issues/1732
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ca9a1fc1cb20af63f1d9ebf90818d6f7310a7f7f0541b74c504595ee9ac3fbc1/developing-today/code/issues/1732
og:image:altProblem DirectoryAuth's pending email-code map grows forever: an entry is only ever removed when that same address comes back to check_code (or re-issues after the resend minute). A code that is is...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release866f202ebf7ac5aff8f633417d9fd8a53818a977
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/1732#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F1732
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F1732
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/1732
Reloadhttps://github.com/developing-today/code/issues/1732
Reloadhttps://github.com/developing-today/code/issues/1732
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests144 (144)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/1732
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/1732
#3748https://github.com/developing-today/code/pull/3748
id(directory_auth): pending email codes are never evicted — the codes map keeps every expired code whose address never comes backhttps://github.com/developing-today/code/issues/1732#top
#3748https://github.com/developing-today/code/pull/3748
https://github.com/dezren39
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 28, 2026https://github.com/developing-today/code/issues/1732#issue-6083446046
#1713https://github.com/developing-today/code/issues/1713
#1730https://github.com/developing-today/code/issues/1730
#1713https://github.com/developing-today/code/issues/1713
#1726https://github.com/developing-today/code/issues/1726
#1730https://github.com/developing-today/code/issues/1730
Nexthttps://github.com/developing-today/code/issues/1732?timeline_page=1
https://github.com/apps/developing-today
developing-todayhttps://github.com/apps/developing-today
on Oct 28, 2026https://github.com/developing-today/code/issues/1732#issuecomment-6475077236
developing.todayhttps://kaneo.security.cab
CODE-697https://kaneo.security.cab/dashboard/workspace/6oQgIkST0YGrCcxrnhbHPOUCfgdD3cqE/project/pfcq432h349r20up18gttfv4/task/s7zjx3fax48up7um4d8bgi0j
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 28, 2026https://github.com/developing-today/code/issues/1732#issuecomment-6475081291
8c8d1bbhttps://github.com/developing-today/code/commit/8c8d1bbbc67865902fdce8a34edfbb1a5e498595
dezren39https://github.com/dezren39
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
on Oct 28, 2026https://github.com/developing-today/code/issues/1732#event-34498494826
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 28, 2026https://github.com/developing-today/code/issues/1732#event-34501118197
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#event-34806997870
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#event-34807035591
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#issuecomment-6551522049
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#event-34837671070
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#issuecomment-6559698352
id(directory_auth): pending email codes are never evicted — the codes map keeps every expired code whose address never comes back #1732https://github.com/developing-today/code/issues/1732
developing-todayhttps://github.com/apps/developing-today
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#event-34839058777
dezren39https://github.com/dezren39
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#event-34839389556
Merge pull request #3748 from developing-today/queue/4789-1732-code-e…https://github.com/developing-today/code/commit/e764f4e74b14399b5a98d567407326fc31aa27e0
#3748https://github.com/developing-today/code/pull/3748
e764f4ehttps://github.com/developing-today/code/commit/e764f4e74b14399b5a98d567407326fc31aa27e0
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#3748https://github.com/developing-today/code/pull/3748
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#event-34839390249
developing-todayhttps://github.com/apps/developing-today
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#event-34839391113
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#issuecomment-6560148318
id(directory_auth): pending email codes are never evicted — the codes map keeps every expired code whose address never comes back #1732https://github.com/developing-today/code/issues/1732
fix(id): evict expired pending directory auth codes on issuance (#1732) #3748https://github.com/developing-today/code/pull/3748
e764f4ehttps://github.com/developing-today/code/commit/e764f4e74b14399b5a98d567407326fc31aa27e0
fix(id): evict expired pending directory auth codes on issuance (#1732) #3748https://github.com/developing-today/code/pull/3748
#3751https://github.com/developing-today/code/issues/3751
#3738https://github.com/developing-today/code/pull/3738
#3751https://github.com/developing-today/code/issues/3751
#3754https://github.com/developing-today/code/pull/3754
#3757https://github.com/developing-today/code/pull/3757
dezren39https://github.com/dezren39
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
on Nov 1, 2026https://github.com/developing-today/code/issues/1732#event-34839411856
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/1732
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/1732
dezren39https://github.com/dezren39
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.