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

key: Check that new key works before deleting the old one #3429

Merged
merged 2 commits into from
Aug 9, 2021

Conversation

MichaelEischer
Copy link
Member

What does this PR change? What problem does it solve?

When adding a new key or changing the password of a key, restic currently just creates the new key (and removes the old one, when changing the password). There's no verification that the new key works for sure. It could be possible that a random error breaks the new key or that it is not stored properly.

This PR adds a check that the new key actually works before continuing.

Was the change discussed in an issue or in the forum before?

Not really, I've mentioned the idea in #2323.

Checklist

  • I have read the Contribution Guidelines
  • I have enabled maintainer edits for this PR
  • I have added tests for all changes in this PR
  • [ ] I have added documentation for the changes (in the manual)
  • There's a new file in changelog/unreleased/ that describes the changes for our users (template here)
  • I have run gofmt on the code in all commits
  • All commit messages are formatted in the same style as the other commits in the repo
  • I'm done, this Pull Request is ready for review

Copy link
Member

@fd0 fd0 left a comment

Choose a reason for hiding this comment

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

Great idea!

@fd0 fd0 merged commit 9fe5a87 into restic:master Aug 9, 2021
@MichaelEischer MichaelEischer deleted the safe-key-change branch August 9, 2021 19:33
MichaelEischer added a commit to MichaelEischer/restic that referenced this pull request Aug 16, 2021
fd0 added a commit that referenced this pull request Sep 8, 2021
mfrischknecht pushed a commit to mfrischknecht/restic that referenced this pull request Jun 14, 2022
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.

None yet

2 participants