Skip to content

Fix HSTS - #25404

Merged
bors-servo merged 1 commit into
servo:masterfrom
Darkspirit:hsts
Jan 8, 2020
Merged

Fix HSTS#25404
bors-servo merged 1 commit into
servo:masterfrom
Darkspirit:hsts

Conversation

@Darkspirit

@Darkspirit Darkspirit commented Dec 30, 2019 •

Copy link
Copy Markdown
Contributor

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.


@highfive

Copy link
Copy Markdown

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

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 30, 2019

@asajeffrey asajeffrey 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.

Some nits but otherwise LGTM.

Comment thread components/net/hsts.rs Resolved
Comment thread components/net/hsts.rs Resolved
Comment thread components/net/hsts.rs Resolved
Comment thread components/net/hsts.rs Resolved
Comment thread components/net/http_loader.rs Resolved
@asajeffrey

Copy link
Copy Markdown
Contributor

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

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 68ebecb has been approved by asajeffrey

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jan 7, 2020
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 68ebecb with merge 96bb571...

bors-servo pushed 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
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 8, 2020
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 68ebecb with merge f95e999...

bors-servo pushed 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
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 8, 2020
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 8, 2020
@jdm

jdm commented Jan 8, 2020

Copy link
Copy Markdown
Member

@bors-servo retry

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 68ebecb with merge 0f6ad77...

bors-servo pushed 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
@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 8, 2020
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 8, 2020
@jdm

jdm commented Jan 8, 2020

Copy link
Copy Markdown
Member

@bors-servo retry

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 68ebecb with merge 080e66f...

bors-servo pushed 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
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 8, 2020
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 8, 2020
@jdm

jdm commented Jan 8, 2020

Copy link
Copy Markdown
Member

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 68ebecb with merge 2a61745...

bors-servo pushed 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
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 8, 2020
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 8, 2020
@jdm

jdm commented Jan 8, 2020

Copy link
Copy Markdown
Member

@bors-servo retry

  • our old friend ipc-channel on linux

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 68ebecb with merge e201b16...

bors-servo pushed 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
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 8, 2020
@bors-servo

Copy link
Copy Markdown
Contributor

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

@bors-servo
bors-servo merged commit 68ebecb into servo:master Jan 8, 2020
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 8, 2020
@Darkspirit
Darkspirit deleted the hsts branch January 8, 2020 20:14
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.

Servo should only support HTTPS connections, zero without "S" Implement HSTS

5 participants