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

Fix HSTS #25404

Merged
merged 1 commit into from Jan 8, 2020
Merged

Fix HSTS #25404

merged 1 commit into from Jan 8, 2020

Conversation

@Darkspirit
Copy link
Contributor

Darkspirit commented Dec 30, 2019

The headers crate does not expose HSTS struct fields. At the moment, it's only usable for HSTS header encoding. An update of the headers crate would require a huge update of http, hyper, hyper_serde, net::decoder as well. Therefore I've copied the typed_get::<StrictTransportSecurity> decoding feature for now, but with exposed struct fields. Let's remove this custom struct with the next hyper upgrade. I tried to prevent needless HSTS database lookups when network.enforce_tls.enabled is set.


  • ./mach build -d does not report any errors

  • ./mach test-tidy does not report any errors

  • These changes fix #14363, fix #20120.

  • There are tests for these changes

@highfive
Copy link

highfive commented Dec 30, 2019

Heads up! This PR modifies the following files:

  • @KiChjang: components/net/fetch/methods.rs, components/net/http_loader.rs, components/net/hsts.rs, components/net/websocket_loader.rs, components/net/tests/http_loader.rs and 1 more
Copy link
Member

asajeffrey left a comment

Some nits but otherwise LGTM.

components/net/hsts.rs Outdated Show resolved Hide resolved
components/net/hsts.rs Show resolved Hide resolved
components/net/hsts.rs Outdated Show resolved Hide resolved
components/net/hsts.rs Outdated Show resolved Hide resolved
@Darkspirit Darkspirit force-pushed the Darkspirit:hsts branch 2 times, most recently from 524cce4 to 668a056 Jan 6, 2020
@Darkspirit Darkspirit force-pushed the Darkspirit:hsts branch from 668a056 to 68ebecb Jan 7, 2020
@asajeffrey
Copy link
Member

asajeffrey commented Jan 7, 2020

OK, thanks for dealing with all my niggles! @bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Jan 7, 2020

📌 Commit 68ebecb has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

Testing commit 68ebecb with merge 96bb571...

bors-servo added a commit that referenced this pull request Jan 8, 2020
Fix HSTS

The headers crate does not [expose](https://github.com/hyperium/headers/blob/0c42ad8cf56f9af28973c3da71616fa478781fdf/src/common/strict_transport_security.rs#L42) HSTS struct fields. At the moment, it's only usable for HSTS header encoding. An update of the headers crate would require a huge update of http, hyper, hyper_serde, net::decoder as well. Therefore I've copied the `typed_get::<StrictTransportSecurity>` decoding feature  for now, but with exposed struct fields. Let's remove this custom struct with the next hyper upgrade. I tried to prevent needless HSTS database lookups when network.enforce_tls.enabled is set.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14363.

- [x] There are tests for these changes
@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jan 8, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

Testing commit 68ebecb with merge f95e999...

bors-servo added a commit that referenced this pull request Jan 8, 2020
Fix HSTS

The headers crate does not [expose](https://github.com/hyperium/headers/blob/0c42ad8cf56f9af28973c3da71616fa478781fdf/src/common/strict_transport_security.rs#L42) HSTS struct fields. At the moment, it's only usable for HSTS header encoding. An update of the headers crate would require a huge update of http, hyper, hyper_serde, net::decoder as well. Therefore I've copied the `typed_get::<StrictTransportSecurity>` decoding feature  for now, but with exposed struct fields. Let's remove this custom struct with the next hyper upgrade. I tried to prevent needless HSTS database lookups when network.enforce_tls.enabled is set.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14363.

- [x] There are tests for these changes
@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jan 8, 2020

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

Testing commit 68ebecb with merge 0f6ad77...

bors-servo added a commit that referenced this pull request Jan 8, 2020
Fix HSTS

The headers crate does not [expose](https://github.com/hyperium/headers/blob/0c42ad8cf56f9af28973c3da71616fa478781fdf/src/common/strict_transport_security.rs#L42) HSTS struct fields. At the moment, it's only usable for HSTS header encoding. An update of the headers crate would require a huge update of http, hyper, hyper_serde, net::decoder as well. Therefore I've copied the `typed_get::<StrictTransportSecurity>` decoding feature  for now, but with exposed struct fields. Let's remove this custom struct with the next hyper upgrade. I tried to prevent needless HSTS database lookups when network.enforce_tls.enabled is set.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14363.

- [x] There are tests for these changes
@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jan 8, 2020

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

Testing commit 68ebecb with merge 080e66f...

bors-servo added a commit that referenced this pull request Jan 8, 2020
Fix HSTS

The headers crate does not [expose](https://github.com/hyperium/headers/blob/0c42ad8cf56f9af28973c3da71616fa478781fdf/src/common/strict_transport_security.rs#L42) HSTS struct fields. At the moment, it's only usable for HSTS header encoding. An update of the headers crate would require a huge update of http, hyper, hyper_serde, net::decoder as well. Therefore I've copied the `typed_get::<StrictTransportSecurity>` decoding feature  for now, but with exposed struct fields. Let's remove this custom struct with the next hyper upgrade. I tried to prevent needless HSTS database lookups when network.enforce_tls.enabled is set.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14363, fix #20120.

- [x] There are tests for these changes
@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jan 8, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

Testing commit 68ebecb with merge 2a61745...

bors-servo added a commit that referenced this pull request Jan 8, 2020
Fix HSTS

The headers crate does not [expose](https://github.com/hyperium/headers/blob/0c42ad8cf56f9af28973c3da71616fa478781fdf/src/common/strict_transport_security.rs#L42) HSTS struct fields. At the moment, it's only usable for HSTS header encoding. An update of the headers crate would require a huge update of http, hyper, hyper_serde, net::decoder as well. Therefore I've copied the `typed_get::<StrictTransportSecurity>` decoding feature  for now, but with exposed struct fields. Let's remove this custom struct with the next hyper upgrade. I tried to prevent needless HSTS database lookups when network.enforce_tls.enabled is set.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14363, fix #20120.

- [x] There are tests for these changes
@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jan 8, 2020

@bors-servo retry

  • our old friend ipc-channel on linux
@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

Testing commit 68ebecb with merge e201b16...

bors-servo added a commit that referenced this pull request Jan 8, 2020
Fix HSTS

The headers crate does not [expose](https://github.com/hyperium/headers/blob/0c42ad8cf56f9af28973c3da71616fa478781fdf/src/common/strict_transport_security.rs#L42) HSTS struct fields. At the moment, it's only usable for HSTS header encoding. An update of the headers crate would require a huge update of http, hyper, hyper_serde, net::decoder as well. Therefore I've copied the `typed_get::<StrictTransportSecurity>` decoding feature  for now, but with exposed struct fields. Let's remove this custom struct with the next hyper upgrade. I tried to prevent needless HSTS database lookups when network.enforce_tls.enabled is set.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14363, fix #20120.

- [x] There are tests for these changes
@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

☀️ Test successful - status-taskcluster
Approved by: asajeffrey
Pushing e201b16 to master...

@bors-servo bors-servo merged commit 68ebecb into servo:master Jan 8, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@Darkspirit Darkspirit deleted the Darkspirit:hsts branch Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.