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

Only use alphanumerics in MPDB token strings #566

Merged
merged 7 commits into from
Nov 2, 2022

Conversation

jaredmixpanel
Copy link
Contributor

Fix for #564

@jaredmixpanel jaredmixpanel requested a review from zihejia October 26, 2022 21:50
@@ -17,7 +17,7 @@ class MPDB {
let apiToken: String

init(token: String) {
apiToken = token.filter { !$0.isWhitespace }
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 add a couple of tests for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

modified testMPDB() to use a token with white space and a bunch of special chars

Copy link
Contributor

@zihejia zihejia left a comment

Choose a reason for hiding this comment

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

LGTM

@jaredmixpanel jaredmixpanel merged commit f3684b6 into master Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants