Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
cmd/juju/user: correct padding for user registration string #7028
Conversation
added some commits
Jan 24, 2017
babbageclunk
suggested changes
Feb 24, 2017
This looks great, thanks! Could you change the PR to be against develop? The merge bot won't merge things into staging directly. (I'm not sure why that's the default when we create PRs.)
howbazaar
changed the base branch from
staging
to
develop
Feb 24, 2017
|
Actually, I got @howbazaar to do it. $$merge$$ |
|
Let's try now. $$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Generating tarball failed |
|
gofmt is unhappy with this - line 118 of add_test.go should be: s.mockAPI.secretKey = []byte(strings.Repeat("X", 32+i))(No spaces in I'd fix it but I don't have the privs required to edit the PR. |
|
@babbageclunk Ugh, fixed - thanks! |
|
Sorry, missed that this was updated. $$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
4a6f656c commentedFeb 23, 2017
The current code incorrectly pads the ASN.1 encoded user registration
data with remainder bytes, rather than padding it to a multiple of
three bytes. This results in equal signs being appended for base64
padding.
Also add test coverage that verifies the registration string only
consists of alphanumeric characters.