Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Prevent import keys from accepting unprefixed ids. #6344
Conversation
| @@ -74,6 +74,14 @@ func (c *importKeysCommand) Init(args []string) error { | ||
| return errors.New("no ssh key id specified") | ||
| default: |
natefinch
Sep 28, 2016
•
Contributor
if len(args) == 0 {
return errors.new("no ssh key id specified")
}
// rest of codeThe like 4 level deep indenting is ugly a hard to read.
| @@ -74,6 +74,14 @@ func (c *importKeysCommand) Init(args []string) error { | ||
| return errors.New("no ssh key id specified") | ||
| default: | ||
| c.sshKeyIds = args | ||
| + for _, k := range c.sshKeyIds { | ||
| + switch k[:3] { |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 12274c3
into
juju:master
Sep 28, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
perrito666 commentedSep 28, 2016
•
Edited 1 time
-
perrito666
Sep 28, 2016
Accepting up-prefixed key ids might lead to accidentally importing
unexpected keys.
QA Steps