fix: Validate authData provider values in challenge endpoint#10224
fix: Validate authData provider values in challenge endpoint#10224mtrezza merged 3 commits intoparse-community:alphafrom
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughReworks authData-related tests between spec files and tightens UsersRouter.handleChallenge: it now rejects non-object top-level authData entries and counts only providers with a truthy Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10224 +/- ##
==========================================
- Coverage 92.59% 92.58% -0.01%
==========================================
Files 192 192
Lines 16304 16307 +3
Branches 199 199
==========================================
+ Hits 15096 15098 +2
- Misses 1191 1192 +1
Partials 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…o AuthenticationAdaptersV2.spec.js
# [9.6.0-alpha.31](9.6.0-alpha.30...9.6.0-alpha.31) (2026-03-16) ### Bug Fixes * Validate authData provider values in challenge endpoint ([#10224](#10224)) ([e5e1f5b](e5e1f5b))
|
🎉 This change has been released in version 9.6.0-alpha.31 |
Issue
The
/challengeendpoint accessesauthData[key].idwithout checking whether the provider value is a non-null object. Sending{ authData: { anonymous: null } }causes aTypeError: Cannot read properties of null (reading 'id')and returns a 500.Fix: validate each provider value is a non-null object before accessing properties, and add null-safe
.idaccess in the filter and find expressions.Tasks
Summary by CodeRabbit
Bug Fixes
Tests