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 issue when importing ssh-keys #2465

Merged
merged 1 commit into from Oct 30, 2016

Conversation

polettix
Copy link
Contributor

This is a proposed change for addressing GH #2446 "Adding a file with two ssh-keys can result in an error".

The following checks are performed:

  • validity of key contents when read from a file
  • key contents only contains one single line/key
  • authorized_keys file is ultimately valid

The last test is an extension over the previous implementation in that all lines in the file are checked.

The commit also includes extensions to the relevant test file to excercise the new checks. It also takes care to save and then restore the authorized_keys file.

This is a proposed change for addressing GH dokku#2446 "Adding a file with
two ssh-keys can result in an error" (see
dokku#2446).

The following checks are performed:

- validity of key contents when read from a file
- key contents only contains one single line/key
- authorized_keys file is ultimately valid

The last test is an extension over the previous implementation in that
all lines in the file are checked.

The commit also includes extensions to the relevant test file to
excercise the new checks. It also takes care to save and then restore
the authorized_keys file.
@josegonzalez josegonzalez merged commit 2d70a10 into dokku:master Oct 30, 2016
@josegonzalez
Copy link
Member

Thanks for the pull request!

@josegonzalez josegonzalez changed the title Patch GH #2446 "Adding a file with two ssh-key..." Fix issue when importing ssh-keys from invalid public key files Jan 9, 2017
@josegonzalez josegonzalez changed the title Fix issue when importing ssh-keys from invalid public key files Fix issue when importing ssh-keys Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants