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: Do not remove all credentials when remove all security keys #2233

Merged
merged 6 commits into from
Feb 20, 2022

Conversation

sawadashota
Copy link
Contributor

Related issue(s)

Fix bug removing all credentials when remove all security keys.
Related: #2181

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
    [email protected]) 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

I'm sorry my previous PR #2181 fixes a bug but causes new bug.

@aeneasr aeneasr added the blocking Blocks milestones or other issues or pulls. label Feb 16, 2022
@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #2233 (5120ea3) into master (40b7db3) will increase coverage by 0.03%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2233      +/-   ##
==========================================
+ Coverage   75.84%   75.87%   +0.03%     
==========================================
  Files         297      297              
  Lines       15905    15909       +4     
==========================================
+ Hits        12063    12071       +8     
+ Misses       2984     2979       -5     
- Partials      858      859       +1     
Impacted Files Coverage Δ
cmd/clidoc/main.go 69.88% <0.00%> (ø)
selfservice/flow/settings/handler.go 68.49% <50.00%> (-1.44%) ⬇️
selfservice/flow/settings/hook.go 72.80% <100.00%> (ø)
selfservice/flow/settings/strategy_helper.go 75.00% <100.00%> (ø)
selfservice/strategy/webauthn/settings.go 64.28% <100.00%> (+0.21%) ⬆️
cmd/courier/watch.go 72.41% <0.00%> (+12.06%) ⬆️

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 8c8a1ab...5120ea3. Read the comment docs.

@@ -223,6 +226,12 @@ func (e *HookExecutor) PostSettingsHook(w http.ResponseWriter, r *http.Request,
return nil
}

x.ContentNegotiationRedirection(w, r, ctxUpdate.GetIdentityToUpdate().CopyWithoutCredentials(), e.d.Writer(), returnTo.String())
i, ok := ctxUpdate.GetIdentityToUpdate()
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add a test for these checks? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This check is useless because there is ctxUpdate.UpdateIdentity(i) at line 166. So I removed these.

@aeneasr aeneasr merged commit ecd715a into ory:master Feb 20, 2022
@sawadashota sawadashota deleted the fix-2181 branch February 21, 2022 01:04
@vinckr vinckr mentioned this pull request Mar 18, 2022
peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking Blocks milestones or other issues or pulls.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants