Commit 35284818 by James Cammarata

Handle ssh key files that may only have a type/key specified

If a specified key did not have a comment, it would be ignored as
an invalid key.

Fixes #4513
parent 6b602678
......@@ -207,6 +207,11 @@ def parsekey(raw_key):
# this line is just 'type key user@host'
(type,key,comment) = key_parts
options = None
elif len(key_parts) == 2:
# assuming just a type/key with no comment
(type,key) = key_parts
comment = ""
options = None
else:
# invalid key, maybe a comment?
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment