fix: retain existing RegistrationAccessTokenSignature when PATCHing an OAuth2 Client - #4094
fix: retain existing RegistrationAccessTokenSignature when PATCHing an OAuth2 Client#4094OMBradF wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe PR preserves ChangesOAuth2 client PATCH preservation
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
… client patchOAuth2Client applies the JSON patch by marshaling the Client struct to JSON, applying patch operations, then unmarshaling back. The RegistrationAccessTokenSignature field is tagged json:"-", so it is excluded from both the marshal and unmarshal steps. The resulting struct has an empty signature, which is then persisted to the database via UpdateClient, permanently overwriting the stored signature with an empty string. Fixes ory#4093 # Conflicts: # client/handler.go
9afd4f2 to
e50d602
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Fixes #4093
patchOAuth2Clientapplies the JSON patch by marshaling the Client struct to JSON, applying patch operations, then unmarshaling back. TheRegistrationAccessTokenSignaturefield is taggedjson:"-", so it is excluded from both the marshal and unmarshal steps. The resulting struct has an empty signature, which is then persisted to the database viaUpdateClient, permanently overwriting the stored signature with an empty string.Related issue(s)
See #4093
Checklist
[ ] I have referenced an issue containing the design document if my changeN/A - updating existing featureintroduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
security@ory.com) from the maintainers to push
the changes.
works.
[ ] I have added or changed the documentation.N/ASummary by CodeRabbit