Repository navigation
VA: Fix SimplifiedHTTP01 w/ HTTPS redirects. - #3959
Merged
Merged
Conversation
added 2 commits
November 29, 2018 11:51
The VA code activated by the `SimplifiedHTTP01` flag had a regression that constructed validation URLs for HTTP-01 challenge redirects to a HTTPS host incorrectly. The regression is fixed and the unit tests are updated to cover this case. An integration test is not included in this commit but will be done as follow-up work since it requires adjusting existing integration tests for HTTP-01 to use the challtestrv instead of Certbot's ACME standalone server.
jsha
requested changes
Nov 29, 2018
| // and so does not need to support constructing a URL with an HTTPS scheme. | ||
| func httpValidationURL(validationIP net.IP, path string, port int) *url.URL { | ||
| // port or the default HTTPS port. The protocol scheme of the URL is HTTP unless | ||
| // useHTTPS is true. UseHTTPS should only be true when constructing validation |
Contributor
There was a problem hiding this comment.
Rather than a useHTTPS bool, why not a scheme string? And we could organize the arguments by URL order: scheme, validationIP, port, path.
Contributor
Author
There was a problem hiding this comment.
I wanted it to be more explicit that the only supported schemes are http and https.
jsha
approved these changes
Nov 29, 2018
rolandshoemaker
approved these changes
Nov 29, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The VA code activated by the
SimplifiedHTTP01flag had a regressionthat constructed validation URLs for HTTP-01 challenge redirects to
a HTTPS host incorrectly.
The regression is fixed and the unit tests are updated to cover this
case. An integration test is not included in this commit but will be
done as follow-up work since it requires adjusting existing integration
tests for HTTP-01 to use the challtestrv instead of Certbot's ACME
standalone server.
Updates #3956