Credential names now support @ and _ #73

Merged
merged 1 commit into from Sep 15, 2016

Conversation

Projects
None yet
3 participants
Owner

wallyworld commented Sep 15, 2016

Credential names now may contain @ and _ characters.
Since _ is used as a separator in the tag string, any names containing _ need to be quoted.

cloudcredential.go
@@ -110,5 +117,22 @@ func IsValidCloudCredentialName(name string) bool {
}
func cloudCredentialTagSuffixToId(s string) string {
@axw

axw Sep 15, 2016

Member

I don't think this handles trailing escapes properly.

Can we just escape "_" to "%5f", and then use url.QueryUnescape?

axw approved these changes Sep 15, 2016

Member

axw commented Sep 15, 2016

LGTM, thanks.

Owner

wallyworld commented Sep 15, 2016

$$merge$$

Contributor

jujubot commented Sep 15, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-names

@jujubot jujubot merged commit 6f338bf into juju:v2 Sep 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment