mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
This is a proposed change for addressing GH #2446 "Adding a file with two ssh-keys can result in an error" (see https://github.com/dokku/dokku/issues/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.