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 handling of SSH keys in modify_credential #1818

Merged

Conversation

timopollmeier
Copy link
Member

What:
If the private key header and footer are not recognized by
truncate_private_key, the original key is now used as intended instead
of reverting to the old private key.
Also, the truncate_private_key function will now work with
"-----BEGIN OPENSSH PRIVATE KEY-----" and the corresponding footer.

Why:
This fixes not being able to modify credentials with SSH keys using
"-----BEGIN OPENSSH PRIVATE KEY-----" (AP-1990).

How did you test it:

Checklist:

  • Tests
  • PR merge commit message adjusted

If the private key header and footer are not recognized by
truncate_private_key, the original key is now used as intended instead
of reverting to the old private key.
Also, the truncate_private_key function will now work with
"-----BEGIN OPENSSH PRIVATE KEY-----" and the corresponding footer.
@timopollmeier timopollmeier requested a review from a team as a code owner May 4, 2022 09:09
@timopollmeier timopollmeier added the backport-to-stable This pull request will be backported to the stable branch label May 5, 2022
@timopollmeier timopollmeier merged commit 7b16d2e into greenbone:main May 5, 2022
timopollmeier added a commit that referenced this pull request May 11, 2022
Merge pull request #1822 from greenbone/mergify/bp/stable/pr-1818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-stable This pull request will be backported to the stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants