Skip to content

VA: Fix SimplifiedHTTP01 w/ HTTPS redirects. - #3959

Merged
cpu merged 2 commits into
masterfrom
cpu-http01-redirect-bug-no-inttests
Nov 30, 2018
Merged

cpu merged 2 commits into
masterfrom
cpu-http01-redirect-bug-no-inttests

Conversation

@cpu

@cpu cpu commented Nov 29, 2018

Copy link
Copy Markdown
Contributor

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.

Updates #3956

Daniel 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.
@cpu cpu self-assigned this Nov 29, 2018
@cpu
cpu requested a review from a team as a code owner November 29, 2018 16:52

@jsha jsha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally looks good!

Comment thread va/http.go
// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than a useHTTPS bool, why not a scheme string? And we could organize the arguments by URL order: scheme, validationIP, port, path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wanted it to be more explicit that the only supported schemes are http and https.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Alright, sounds reasonable.

@cpu
cpu merged commit 8a610e5 into master Nov 30, 2018
@cpu
cpu deleted the cpu-http01-redirect-bug-no-inttests branch November 30, 2018 13:12
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