Skip to content

auth: the vendor accept-invitation route admits a session whose email is unverified; require a verified address there too (narrowing, after #34257) #34272

Closed

Description

@objectstack-fleet

domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

Filing gate: ① the step-1 reading of #34257 measured this, and the seat ruled it a card of its own (Q4 B). ⛔ Not a claim.

维护者速读

Rule

Accepting an organization invitation requires a verified email address (#34257's rule). #34257 enforces it on its new accept-with-proof door and on the accept page. The vendor /organization/accept-invitation route plugin-auth serves still accepts for a session whose address is unverified: the vendor check runs only when asked, and plugin-auth leaves it off (auth-manager-organization-plugin.ts:199).

Change

Order: after #34257 lands, so the accept page already has the proof path before this refusal ships.

Prior rulings read: the seat's Q4 ruling on #34257 (keep the vendor route unchanged there; this card carries the narrowing); ADR-0138 and ruling 6413975861 Q2 B, as #34257 amends them.
Dedupe words: requireEmailVerificationOnInvitation; accept-invitation unverified email.

Activity

  1. added
    enhancement
    priority:p2
    pm:queue
    domain:server
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: regrade p2 → p1 · theme: security (maintainer-approved) · 2026-11-16T16:27Z

    ⛔ Not a claim.

    Backlog re-grade (p2 batch 3). #34257 (p1) requires mailbox proof only on the new one-step accept route. Until this card lands, the original accept-invitation route still admits an unverified address, so the same hole stays open. p1, sequenced after #34257.

  3. added
    priority:p1
    and removed
    priority:p2
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    Premise corrected · written at 2026-11-17T03:54Z · ⛔ not a claim

    Area o2-H measured this card on main 31096af83d, after #34333 merged. The seat accepts the reading. The goal is unchanged: accepting an invitation requires a verified address. Only where and how the fix is made changes, because the card's fix reaches further than its rule.

    • Holds. auth-manager-organization-plugin.ts line 200 still sets requireEmailVerificationOnInvitation: false.
    • The card's fix is wider than the card's rule. The vendor flag is read by three id-addressed routes in better-auth 1.7.12, not just accept: accept-invitation, reject-invitation and get-invitation. plugin-auth's own list-user-invitations-verification.ts (around line 135) mirrors it. Turning the flag on would also refuse an unverified person who tries to reject or view an invitation. The accept page calls get-invitation before it shows the accept button (AcceptInvitationPage.tsx around line 197), so that person would see a lookup error instead of being sent to verification.
    • A deployment with no email service would hit a dead end. The comment at about line 195 explains that the flag is off because the framework is not wired to mail, and with no emailService the link is only printed. Since feat(auth): an invitation is accepted in one step with the proof its mail carries #34333, a copied link still takes the "verify first" path. With the flag on unconditionally, an invitee on a self-hosted deployment without mail could never verify, so all four doors would refuse them for good.

    Narrowed scope (dispatched):

    • Only the accept-invitation door changes. A plugin-auth before-hook refuses a session whose address is unverified, with a typed refusal, and the accept page routes that refusal to the verification email.
    • It applies only where an email service is wired. A deployment without one keeps today's behaviour, and the upgrade note says so.
    • get, reject and list are unchanged.
    • It is still a narrowing (BREAKING): changeset, ADR-0087 entry, upgrade note and battery. It lands through Tier H.

    Turning the whole flag on, accepting both consequences above, would be a different product decision. Nobody has asked for it, so it is not opened.

    维护者速读

    • 现象:老的「接受邀请」入口不要求邮箱已验证。
    • 怎么修(收窄后):只在「接受」这一个入口拦下未验证的会话,并引导去验证邮件;「查看」「拒绝」「列表」不变;没接邮件服务的部署保持现状,在升级说明里写明。
    • 需要你做的:无(落地时照常审批)。
  5. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSYe73LCZ6WxGFvcko

    Claim: PM loop · area o2-H · 2026-11-17T03:57Z
    Session: session_01ADHkmSYe73LCZ6WxGFvcko
    Account: os-steve
    Branch: claude/issue-34272-accept-invitation-verified (from origin/main 31096af, after #34333 merged)
    Worktree: objectstack (the area thread's own checkout)
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/plugins/plugin-auth/src/ — a new module for the accept-door refusal and its test, the call in auth-manager-before-hook.ts, the comment at auth-manager-organization-plugin.ts ~195 (the vendor flag stays false); ui/packages/app-shell/src/console/organizations/manage/AcceptInvitationPage.tsx (route the refusal to its verify-email state) and a test beside it; content/docs/deployment/self-hosting.mdx (the invitation paragraph); root .changeset/** (BREAKING, upgrade note, ADR-0087 disposition) (stop on breach; explain in the report)
    Container & model: M, mode:thread (the area thread implements it itself), model: default judgement tier, effort: high
    Clause-②: no (narrowing)
    Metadata-protocol: none
    Responsibility: plugin-auth organization invitation doors (objectstack) | better-auth's /organization/accept-invitation admits a session whose address is unverified because plugin-auth declares the vendor flag false for no-mail deployments | every organization whose invitation can be accepted by an account that never proved its mailbox, on a deployment that does send mail
    Thread-read: 6937749254
    Premise: corrected 6937749254 (accept door only, through a plugin-auth before-hook, with a typed refusal the accept page routes to verification; only where email delivery is live; get, reject and list unchanged; still a narrowing through Tier H)
    Serial constraints cleared: #34333 (#34257, same plugin-auth files) merged 2026-11-17 03:53Z. Open PRs read just now: the only one touching packages/plugins/plugin-auth/ is #34617 (auth-manager-auth-instance.ts, totp-code-single-use*), disjoint from the surface above; none touches AcceptInvitationPage.tsx. git merge-tree against #34617's head is run again before the PR.
    Pre-claim lane: domain:server — plugin-auth; seat 2 granted this card to area o2-H (relay 03:52Z).
    Pre-claim deps: no Blocked-by:; its order ("after #34257 lands") is met.
    Prior rulings read: auth,vendor,accept-invitation,route,admits,session,whose,email,unverified,require,verified,address (+1 more) → 179 hits; ADR-0061 D2, ADR-0069 D5, ADR-0022 Decision §5, ADR-0036 Decision §5, ADR-0069 D1, ADR-0143 D5; plus the seat's Q4 ruling on #34257 and ADR-0138 / ruling 6413975861 Q2 B as #34257 amends them; thread: none; repo: objectstack-ai/objectstack

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    2026-11-17T07:49Z Maintainer ruling recorded (the advisory question on this card). Steve, in this project's chat at 2026-11-17T07:49Z: 「34272 没关系」. Read as: no separate security advisory is filed for this card, the card stays public, and the fix lands through PR #34666 as handed off (awaiting os-zhuang). The security label stays as the record of what the card is.

  8. removed
    pm:dispatched
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverenhancementpriority:p1security

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions