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

Correctly encode query strings in notifiers #1516

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

stuartnelson3
Copy link
Contributor

@stuartnelson3 stuartnelson3 commented Aug 13, 2018

In moving from a plain string to url.URL, we
incorrectly were setting the query string via the
path. The ? signaling the start of the query
string would then be escaped when the URL was
turned into a string.

@mxinden @simonpasquier I would classify this as extremely important, we should get a release out as soon as this is merged IMO. I'm guessing hipchat, wechat, and opsgenie are all broken?

Fixes #1515

In moving from a plain string to url.URL, we
incorrectly were setting the query string via the
path. The `?` signaling the start of the query
string would then be escaped when the URL was
turned into a string.

Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>
@simonpasquier
Copy link
Member

👍 my bad...

we should get a release out as soon as this is merged IMO. I'm guessing hipchat, wechat, and opsgenie are all broken?

Agreed. It reinforces the need for unit testing every notifier. Even if the external APIs are out of control, we could still verify that the client still sends the same requests after refactoring.

@stuartnelson3
Copy link
Contributor Author

I'll create an issue, but the first thing that comes to mind is recording the request body and making sure that stays the same

@stuartnelson3 stuartnelson3 merged commit f8b95a2 into master Aug 13, 2018
@stuartnelson3 stuartnelson3 deleted the stn/set-notifier-query-strings branch August 13, 2018 11:34
@stuartnelson3
Copy link
Contributor Author

@mxinden I'm technically on vacation .. do you have time to do a release today (or soon)?

@mxinden
Copy link
Member

mxinden commented Aug 13, 2018

@mxinden I'm technically on vacation .. do you have time to do a release today (or soon)?

@stuartnelson3 sorry for the delay. I will prepare the release tomorrow.

mxinden pushed a commit to mxinden/alertmanager that referenced this pull request Aug 14, 2018
In moving from a plain string to url.URL, we
incorrectly were setting the query string via the
path. The `?` signaling the start of the query
string would then be escaped when the URL was
turned into a string.

Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>
mxinden pushed a commit to mxinden/alertmanager that referenced this pull request Aug 14, 2018
In moving from a plain string to url.URL, we
incorrectly were setting the query string via the
path. The `?` signaling the start of the query
string would then be escaped when the URL was
turned into a string.

Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>
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