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

Network Security : Implement StrictOrigin and StrictOriginWhenCrossOr… #14059

Merged
merged 4 commits into from Nov 7, 2016

Conversation

@nmvk
Copy link
Contributor

nmvk commented Nov 4, 2016

This pull request contains commit implementing initial steps for Improving Network Security project. As part of initial steps referer policy enums for strict-origin and strict-origin-when-cross-origin have been added to hyper. Unit tests and additional logic has been added to handle these policies. Since enum changes are available on hyper version 0.9.11. We had to update hyper version to 0.9.11.

Hyper 0.9.11 depends on num_cpus 1.1.0. To avoid different version of num_cpus. We have updated rayon version from 0.4.0 to 0.4.3. Cargo.toml of util, style, geckolib, stylo component has been updated to use num_cpus version 1.1.0 instead of 0.2.2.


  • [ X] ./mach build -d does not report any errors
  • [ X] ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

…igin

Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.


This change is Reviewable

…igin

Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.
@bors-servo
Copy link
Contributor

bors-servo commented Nov 4, 2016

The latest upstream changes (presumably #13816) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

nox left a comment

Some nits.

if referrer_url.scheme() == "https" && url.scheme() != "https" {
return None;
}
return strip_url(referrer_url, true);

This comment has been minimized.

@nox

nox Nov 4, 2016

Member

Nit: return is useless here.

This comment has been minimized.

@nmvk

nmvk Nov 4, 2016

Author Contributor

Can you please elaborate why return is not required?

Thanks,
Raghav

This comment has been minimized.

@nox

nox Nov 4, 2016

Member

It's the last expression of the function, and the last expression in a function is the function's return value.

This comment has been minimized.

@nmvk

nmvk Nov 4, 2016

Author Contributor

Thank you,

I will change and commit the changes

if cross_origin {
return strip_url(referrer_url, true);
}
return strip_url(referrer_url, false);

This comment has been minimized.

@nox

nox Nov 4, 2016

Member

Nit: return is useless here and doing strip_url(referrer_url, cross_origin) is shorter.


/// https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin
fn strict_origin_when_cross_origin(referrer_url: Url, url: Url) -> Option<Url> {
let cross_origin = referrer_url.origin() != url.origin();

This comment has been minimized.

@nox

nox Nov 4, 2016

Member

Nit: you can do that after the return None shortcut.

let cross_origin = referrer_url.origin() != url.origin();
if referrer_url.scheme() == "https" && url.scheme() != "https" {
return None;
} else {

This comment has been minimized.

@nox

nox Nov 4, 2016

Member

Nit: no need for a else here, removing it reduces indentation which is nice.

@nox nox self-assigned this Nov 4, 2016
@nox
Copy link
Member

nox commented Nov 4, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 4, 2016

🔒 Merge conflict

@gurudarshan266 gurudarshan266 force-pushed the nmvk:refPolicy branch from be503ba to 85d4d4e Nov 4, 2016
Incorporated code review comments in components/net/http_loader.rs
Resolved merge conflicts in cargo.lock file. Updated ReferrerPolicy in
lib.rs
@nmvk nmvk force-pushed the nmvk:refPolicy branch from 85d4d4e to 26dac98 Nov 4, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Nov 4, 2016

The latest upstream changes (presumably #14054) made this pull request unmergeable. Please resolve the merge conflicts.

Since last execution statement is the value which is returned, return
keyword has been removed from method strict_origin and
strict_origin_when_cross_origin.

Merge conflicts in Cargo.lock has been handled
@jdm jdm removed the S-needs-rebase label Nov 4, 2016
@jdm
Copy link
Member

jdm commented Nov 4, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 4, 2016

Trying commit e0e734f with merge 7586dd8...

bors-servo added a commit that referenced this pull request Nov 4, 2016
Network Security : Implement StrictOrigin and StrictOriginWhenCrossOr…

This pull request contains commit implementing initial steps for Improving Network Security project. As part of initial steps referer policy enums for strict-origin and strict-origin-when-cross-origin have been added to hyper([hyperium/hyper#943]). Unit tests and additional logic has been added to handle these policies. Since enum changes are available on hyper version 0.9.11. We had to update hyper version to 0.9.11.

Hyper 0.9.11 depends on num_cpus 1.1.0. To avoid different version of num_cpus. We have updated rayon version from 0.4.0 to 0.4.3. Cargo.toml of util, style, geckolib, stylo component has been updated to use num_cpus version 1.1.0 instead of 0.2.2.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ X] `./mach build -d` does not report any errors
- [ X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

…igin

Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14059)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 4, 2016

💔 Test failed - mac-rel-wpt2

@highfive
Copy link

highfive commented Nov 4, 2016

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-insecure.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-insecure.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with no-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-insecure.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/http-rp/cross-origin/http-http/xhr-request/cross-insecure.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/http-rp/cross-origin/http-http/xhr-request/cross-insecure.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with no-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/http-rp/cross-origin/http-http/xhr-request/cross-insecure.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-insecure.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/http-rp/same-origin/http-http/xhr-request/same-insecure.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/meta-referrer/cross-origin/http-http/script-tag/cross-insecure.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with no-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/meta-referrer/cross-origin/http-http/script-tag/cross-insecure.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/meta-referrer/cross-origin/http-http/script-tag/cross-insecure.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/meta-referrer/cross-origin/http-http/xhr-request/cross-insecure.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/meta-referrer/cross-origin/http-http/xhr-request/cross-insecure.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with no-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/meta-referrer/cross-origin/http-http/xhr-request/cross-insecure.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/meta-referrer/same-origin/http-http/script-tag/same-insecure.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                               </span><span class="stdout">  document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin-when-cross-origin/meta-referrer/same-origin/http-http/xhr-request/same-insecure.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/cross-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/cross-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with no-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/cross-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/cross-origin/http-http/xhr-request/insecure-protocol.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/cross-origin/http-http/xhr-request/insecure-protocol.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with no-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/cross-origin/http-http/xhr-request/insecure-protocol.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/same-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/same-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with no-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/same-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the http-rp\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/same-origin/http-http/xhr-request/insecure-protocol.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with no-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/same-origin/http-http/xhr-request/insecure-protocol.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/http-rp/same-origin/http-http/xhr-request/insecure-protocol.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the http-rp\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/cross-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/cross-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with no-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/cross-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/cross-origin/http-http/xhr-request/insecure-protocol.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/cross-origin/http-http/xhr-request/insecure-protocol.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with no-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/cross-origin/http-http/xhr-request/insecure-protocol.swap-origin-redirect.ht</span><span class="stdout">tp.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is cross-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/same-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/same-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with no-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/same-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via script-tag using the meta-referrer\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/same-origin/http-http/xhr-request/insecure-protocol.keep-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/same-origin/http-http/xhr-request/insecure-protocol.no-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with no-redirect and when\n                                 the target request is same-origin.

  ▶ Unexpected subtest result in /referrer-policy/strict-origin/meta-referrer/same-origin/http-http/xhr-request/insecure-protocol.swap-origin-redirect.http.html:
  └ PASS [expected FAIL] The referrer URL is origin when a\n                                 document served over http requires an http\n                                 sub-resource via xhr-request using the meta-referrer\n                                 delivery method with swap-origin-redirect and when\n                                 the target request is same-origin.

  ▶ TIMEOUT [expected CRASH] /_mozilla/mozilla/sigsegv.html
  │ 
  │ VMware, Inc.
  │ Gallium 0.4 on softpipe
  └ 3.3 (Core Profile) Mesa 12.0.1
@jdm
Copy link
Member

jdm commented Nov 4, 2016

Look at all those newly-passing tests! The timeout is #14067 and can be ignored, but the rest need to have their expected results updated.

@jdm
Copy link
Member

jdm commented Nov 4, 2016

Also, it looks like there was a rebase error in cef/Cargo.lock: https://github.com/servo/servo/pull/14059/files#diff-f58e90618d14a4b6a043be78f4a4af21R2882

…er policy

Fixed rebase issue in ports/cef/Cargo.lock
Deleted PASSing testcases which were failing before implementation of referrer policies
@highfive highfive removed the S-tests-failed label Nov 5, 2016
@gurudarshan266
Copy link

gurudarshan266 commented Nov 5, 2016

@jdm All the .ini files corresponding to PASSing testcases have been removed for strict-origin and strict-origin-when-cross-origin referrer policies

@nox
Copy link
Member

nox commented Nov 7, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 7, 2016

📌 Commit e0132b9 has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Nov 7, 2016

Testing commit e0132b9 with merge dd34b2a...

bors-servo added a commit that referenced this pull request Nov 7, 2016
Network Security : Implement StrictOrigin and StrictOriginWhenCrossOr…

This pull request contains commit implementing initial steps for Improving Network Security project. As part of initial steps referer policy enums for strict-origin and strict-origin-when-cross-origin have been added to [hyper](hyperium/hyper#943). Unit tests and additional logic has been added to handle these policies. Since enum changes are available on hyper version 0.9.11. We had to update hyper version to 0.9.11.

Hyper 0.9.11 depends on num_cpus 1.1.0. To avoid different version of num_cpus. We have updated rayon version from 0.4.0 to 0.4.3. Cargo.toml of util, style, geckolib, stylo component has been updated to use num_cpus version 1.1.0 instead of 0.2.2.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ X] `./mach build -d` does not report any errors
- [ X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

…igin

Referer policy strict-origin and strict-origin-when-cross-origin changes have been implemented. Relevant unit test cases have been added. Enum for RefererPolicy has been added to hyper codebase and v 0.9.11 of hyper contains these changes.

This commit also contains changes related to upgrade of hyper from v0.9.10 to v0.9.11. Other dependencies changed are rayon, utils, num_cpus.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14059)
<!-- Reviewable:end -->
@nox nox mentioned this pull request Nov 7, 2016
0 of 5 tasks complete
@bors-servo
Copy link
Contributor

bors-servo commented Nov 7, 2016

@bors-servo bors-servo merged commit e0132b9 into servo:master Nov 7, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
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.

None yet

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