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

Separate password lockouts from account restrictions

Public commit record

What the developer wrote

Authored by Nicolas Dorier

50/100 · Thin
Separate password lockouts from account restrictions
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit rewrites how BTCPay Server blocks users. Previously, the app reused ASP.NET Identity's password-lockout mechanism to disable accounts permanently (for admin bans) and for subscription/monetization reasons. That caused a side effect: too many wrong password attempts could lock an account and also disable its API keys. The change introduces a separate 'user access restrictions' table so that password lockouts and account disabling are independent. API keys now keep working during a temporary password lockout, while admin or monetization restrictions still block access. The commit also adds a migration that converts existing permanent lockouts into the new restriction records.

Recommended action

Review the migration SQL carefully before deploying, especially the classification of existing permanent lockouts into Administrative vs Monetization, because misclassification could unintentionally re-enable or restrict users. Verify that all authentication paths (API key, basic auth, password, FIDO2, LNURL-auth, authenticator) correctly distinguish lockout from restriction. Run the new integration tests and consider adding tests for concurrent restriction changes and for the migration's edge cases.

Security signals we found

01

Separation of authentication lockout from authorization restriction

02

New UserAccessRestriction table for administrative and monetization restrictions

03

API key authentication no longer disabled by password lockout

04

Migration of existing permanent lockouts to new restriction model

05

Security stamp invalidation still applied when restriction is added

06

Store noActiveUser flag recomputed based on access restrictions

Risk score

Why this scored 61/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 12/15
Confidence 7/10
Evidence quality 4/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.