Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: patch should not reset client secret #2872

Merged
merged 3 commits into from
Nov 26, 2021

Conversation

lpedrosa
Copy link
Contributor

Fixes the bug reported in #2869 by checking if the PATCH actually changes the Client Secret before updating. If the secret has not changed, we clear it as expected by the UpdateClient function, so the original secret remains untouched.

Related issue(s)

#2869

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security. vulnerability, I
    confirm that I got green light (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@lpedrosa lpedrosa requested a review from aeneasr as a code owner November 24, 2021 16:06
@lpedrosa lpedrosa changed the title Fix patch secret reset fix: patch should not reset client secret Nov 24, 2021
@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #2872 (766a245) into master (7dd428e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2872   +/-   ##
=======================================
  Coverage   76.84%   76.85%           
=======================================
  Files         105      105           
  Lines        7143     7146    +3     
=======================================
+ Hits         5489     5492    +3     
  Misses       1248     1248           
  Partials      406      406           
Impacted Files Coverage Δ
client/handler.go 62.50% <100.00%> (+1.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7dd428e...766a245. Read the comment docs.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@aeneasr aeneasr merged commit 895de01 into ory:master Nov 26, 2021
@lpedrosa lpedrosa deleted the fix-patch-secret-reset branch November 26, 2021 21:29
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.

2 participants