Bug 2071347 - #2757
Merged
Merged
Bug 2071347#2757
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
OAuth bearer authentication can return a 500 instead of the intended JSON 401 for disabled users.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Enforces account-state restrictions across native authentication, blocking disabled or password-reset-required accounts from using existing credentials.
Changes:
- Adds shared account usability checks.
- Applies checks to API-key and OAuth2 authentication.
- Adds regression coverage for REST and OAuth flows.
| File | Description |
|---|---|
t/app-login-disabled-account.t |
Tests disabled and password-reset authentication behavior. |
Bugzilla/App/Plugin/OAuth2/Provider.pm |
Validates OAuth users; REST usage mode must be normalized before validation to prevent a 500 response. |
Bugzilla/App/Plugin/Login.pm |
Adds account-state validation, redirects, and REST error-mode handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…arer-token usability checks' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Review carried over from private pull request
https://bugzilla.mozilla.org/show_bug.cgi?id=2071347