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

Newline in VERSION file causes HTTP request failure #3

Merged
merged 2 commits into from
Dec 19, 2017
Merged

Newline in VERSION file causes HTTP request failure #3

merged 2 commits into from
Dec 19, 2017

Conversation

kilink
Copy link
Contributor

@kilink kilink commented Dec 19, 2017

A newline introduced at the end of the VERSION file is causing discovery to fail on our OpenID provider due to malformed headers. SWD adds a user-agent header of "SWD (#{VERSION})" to its requests, so when VERSION contains a newline, we end up getting a "400 Bad Request" response from our server.

The fix here is to strip whitespace from what we read from VERSION.

A newline was introduced into the VERSION file in 1.1.0; because it is
also used in the user-agent string for HTTP requests, it could cause 400
responses from strict servers that reject the malformed headers.
@nov nov merged commit 91bbd7d into nov:master Dec 19, 2017
@nov
Copy link
Owner

nov commented Dec 19, 2017

Sorry about that.
I've just released v1.1.2 of this gem.

Thanks for your contribution.

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.

2 participants