AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 37 Bitcoin

Add store invitations table (#7519)

Public commit record

What the developer wrote

Authored by dstrukt

53/100 · Thin
Add store invitations table (#7519)
✓ Descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds a new 'store invitations' feature to BTCPay Server. Store owners can now invite users by email with a time-limited link instead of adding them immediately. The change introduces new database tables, API endpoints, web pages, email notifications, and security checks. It also tightens some existing rules: only server admins can skip the invitation flow, and the last store owner cannot have their role changed or be removed. The code appears to be a deliberate security-hardening feature rather than a fix for an active vulnerability, but it changes who can gain store access and how.

Recommended action

Reviewers should verify: (1) The `CanModifyProfile` policy is the correct minimum privilege for accepting/declining invitations and cannot be satisfied by a store-less user in unexpected ways. (2) The `RequireInvitation=false` bypass is enforced server-side in both UI and API. (3) The `DeleteStoreInvitation` calls in `AddStoreUser` and `UpdateStoreUserRole` reliably race-proof token reuse. (4) The `StoreInvitationRow.HashToken` collision resistance and token entropy (24 bytes base58) are adequate. (5) The new Razor views using `ViewLocalizer` encode all dynamic parameters per the added SKILL.md guidance. (6) The `LockSubscription` + `DisableNonAdminCreateUserApi` interactions do not allow non-admins to create accounts via the invitation flow when disabled.

Security signals we found

01

New authentication/authorization boundary for invitation acceptance (CanModifyProfile)

02

Invitation tokens are SHA-256 hashed at rest

03

Invitation links are time-limited (24 hours) and invalidated on resend

04

Direct membership add/update deletes outstanding invitations to prevent token reuse overwriting roles

05

Only server admins can bypass invitation requirement via RequireInvitation=false

06

Last-owner protection enforced in role updates

07

New user creation path in Greenfield API gated by CanCreateUser when LockSubscription is enabled

08

Razor localization guidance added to avoid XSS via ViewLocalizer

Risk score

Why this scored 37/100

Our methodology →
Potential impact 8/30
Exploitability 7/25
Stealth signal 5/15
Affected reach 8/15
Confidence 6/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.