Skip to content

fix(auth): key login lockout on the presented credentials - #1309

Merged
scttbnsn merged 2 commits into
dev/v1.7from
fix/v1.7-lockout-identity
Oct 4, 2026
Merged

scttbnsn merged 2 commits into
dev/v1.7from
fix/v1.7-lockout-identity

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Login lockout keyed on a username taken from the request body. A client could guess one account's password in the Basic header while naming a different user in the body, so the lock check and the failure count landed on the other name and the real account never locked. Only the per-IP limit still applied. A successful login could also clear another account's failure count the same way.

The lockout identity is now the Basic header's username whenever an Authorization header is present; the body username is only used when there is none, and a malformed header yields no identity. Success clears only the authenticated user's own count.

Tests cover the decoy-name case, a locked account with a decoy name, cross-account clearing, and malformed and blank headers, at the default thresholds.

@vercel

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

Deployment failed for project drydock-website with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/codeswhat?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
drydockdemo-website Ready Ready Preview Oct 4, 2026 3:00pm UTC

@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: CodesWhat/drydock/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6eb2ac25-15cf-4264-93bd-08186381f547
📥 Commits

Reviewing files that changed from the base of the PR and between be49860 and df9b9ee.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (2)
  • app/api/auth-lockout.test.ts
  • app/api/auth-lockout.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn
scttbnsn merged commit 5f2ac7c into dev/v1.7 Oct 4, 2026
@scttbnsn
scttbnsn deleted the fix/v1.7-lockout-identity branch October 4, 2026 15:32

This branch was successfully deployed

1 active deployment
Preview – drydockdemo-website — df9b9ee9 Deployed Oct 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant