Fix for PasswordlessEmailRequest passing literal NULL when no client_secre…#800
Merged
Fix for PasswordlessEmailRequest passing literal NULL when no client_secre…#800
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #800 +/- ##
==========================================
- Coverage 74.09% 74.06% -0.04%
==========================================
Files 438 438
Lines 5663 5664 +1
Branches 346 347 +1
==========================================
- Hits 4196 4195 -1
- Misses 1315 1317 +2
Partials 152 152
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nandan-bhat
approved these changes
Apr 9, 2025
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.
…t was provided
Changes
The problem
ExpandoObjectfrom the request and passing this as body to the API call.NullValueHandling = NullValueHandling.Ignoreto ignore NULL values, we observed that theNULLvalue (forclient_secret) in this case was still considered during serialisation.NewtonSoft.JSON, by design, theNullValueHandling = NullValueHandling.Ignoreis only for instances of classes and not for objects like Dictionaries. A similar issue raised on NewtonSoft.JsonThe Fix
NULLcheck, wherever applicable, before we add a field to theExpandoObject. This removes the field from the body and hence would not send any un-warranted data to the API as part of the request.References 📚
Please include relevant links supporting this change such as a:
Testing
Added a test case that reproduces the scenario mentioned in #797
This change adds unit test coverage
This change adds integration test coverage
This change has been tested on the latest version of the platform/language or why not
Checklist ☑️
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors