Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow non-printable characters in the API client's token #3841

Merged
merged 4 commits into from
Jan 25, 2018

Conversation

jefferai
Copy link
Member

A better place to do this would be SetToken but that would require API
breaks so this is a better solution for now.

A better place to do this would be SetToken but that would require API
breaks so this is a better solution for now.
@jefferai jefferai added this to the 0.9.2 milestone Jan 24, 2018
@@ -95,6 +96,23 @@ func TestClientToken(t *testing.T) {
}
}

func TestClientBadToken(t *testing.T) {
tokenValue := "foo\u007f"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also test a token that should pass the printable check?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sure.

briankassouf
briankassouf previously approved these changes Jan 24, 2018
Copy link
Contributor

@briankassouf briankassouf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the comment about the test

calvn
calvn previously approved these changes Jan 24, 2018
@jefferai jefferai dismissed stale reviews from calvn and briankassouf via 2ba43f6 January 24, 2018 22:25
@jefferai jefferai merged commit 460e8fc into master Jan 25, 2018
@jefferai jefferai deleted the printable-token-api-client branch January 25, 2018 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants