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

Support URI reserved characters in proxy server passwords. #757

Merged
merged 1 commit into from
Jun 25, 2018

Conversation

petelacey
Copy link
Contributor

I was the guy who submitted the original PR for proxy server support in Rollbar. Unfortunately, that code will fail in the proxy requires authentication, the credentials include URI-reserved characters, such as '@' or '?', and the credentials are provided as part of the Rollbar configuration.

This PR addresses that by holding the proxy configuration information in a Struct instead of a URI object. This PR includes tests, but the fix has also been tested in a runtime environment.

@rokob
Copy link
Contributor

rokob commented Jun 25, 2018

This is an interesting case, Net::HTTP is just fine with proxy passwords with special characters but URI is not. I just double checked that sending a request with Net::HTTP after setting the proxy password to something with an @ works just fine. URI#password= on the other hand throws a URI::InvalidComponentError: bad component(expected user component). This seems like a reasonable approach to me because we never use the returned URI object as anything but a bag of properties.

@rokob rokob merged commit 2b663e6 into rollbar:master Jun 25, 2018
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