Commit Graph

20153 Commits

Author SHA1 Message Date
Dimi Lee
acbbeb5981 Bug 1639718 - P2. Protection features call OnBeforeBlockChannel before blocking the channel. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D76837
2020-05-28 09:51:23 +00:00
Dimi Lee
86d87ef93e Bug 1639718 - P1. Add ChannelClassifierService to support notifying/unblocking channel. r=baku
ChannelClassifierService notifies "urlclassifier-before-block-channel"
event when a channel is going to be blocked by protection features.

It also provides an API for receivers to "unblock" the channel.

Sample usage:
this.service = Cc["@mozilla.org/url-classifier/channel-classifier-service;1"].getService(
  Ci.nsIChannelClassifierService
);
if (this.service) {
  this.service.addListener({
    observe(aSubject, aTopic, aData) {
      switch (aTopic) {
        case "urlclassifier-before-block-channel":
          let channel = aSubject.QueryInterface(Ci.nsIUrlClassifierBlockedChannel);
          channel.unblock();
          break;
      }
    },
  })
}

Differential Revision: https://phabricator.services.mozilla.com/D76836
2020-05-28 09:51:15 +00:00
Valentin Gosu
d51967f492 Bug 1640872 - Add more TRR logging r=necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D76826
2020-05-28 06:58:04 +00:00
Razvan Maries
a985167fa6 Backed out 7 changesets (bug 1638711) for perma failures on test_bug375314-2.html. CLOSED TREE
Backed out changeset 9643bf18ac31 (bug 1638711)
Backed out changeset 3d06b48e2e3a (bug 1638711)
Backed out changeset c2a1461890c3 (bug 1638711)
Backed out changeset 9eda9f6c5877 (bug 1638711)
Backed out changeset f776c30279f3 (bug 1638711)
Backed out changeset b34546384903 (bug 1638711)
Backed out changeset 47da03dd8365 (bug 1638711)
2020-05-28 04:25:38 +03:00
Matt Woodrow
74388c26ab Bug 1638711 - Do document security checks in parent process. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75720
2020-05-27 09:39:44 +00:00
prathiksha
f247187965 Bug 1634947 - Update the TLS deprecated error message in Firefox. r=johannh,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D77021
2020-05-27 21:58:30 +00:00
Eden Chuang
612b473d45 Bug 1634419 - Skip CORP checking for TYPE_WEBSOCKET loading r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D74655
2020-05-27 21:29:32 +00:00
Emilio Cobos Álvarez
54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Eden Chuang
8ec5c50a7f Bug 1575095 - P2 Apply COOP switch with InterceptedHttpChannel in DocumentLoadListener r=necko-reviewers,valentin,mattwoodrow
The response from ServiceWorker might also be COOP mismatched, such that the document/sub-document loading need to be performed on another process.
However, DocumentLoadListener only works with nsHttpChannel.

This patch would like to support InterceptedHttpChannel in DocumentLoadListener.

Differential Revision: https://phabricator.services.mozilla.com/D76841
2020-05-27 15:37:21 +00:00
Eden Chuang
a570025eed Bug 1575095 - P1 Move CrossOriginXXXHeaders checking into HttpBaseChannel and apply CrossOriginXXXHeaders in InterceptedHttpChannel. r=valentin
Move COOP, COEP, and CORP checking into HttpBaseChannel, and apply these checking on InterceptedHttpChannel.

Differential Revision: https://phabricator.services.mozilla.com/D54224
2020-05-27 15:37:09 +00:00
Dorel Luca
cb70b659d6 Backed out changeset 0440fa5863b2 (bug 1634947) for Devtools failures in browser_webconsole_certificate_messages.js . CLOSED TREE 2020-05-27 17:52:28 +03:00
prathiksha
18ae80df9c Bug 1634947 - Update the TLS deprecated error message in Firefox. r=johannh,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D77021
2020-05-27 11:43:20 +00:00
Andrea Marchesini
8605dd5b17 Bug 1639570 - Implement nsICookieService::getCookieStringFromDocument - part 2 - tests, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D76143
2020-05-27 10:15:41 +00:00
Andrea Marchesini
ab373eca61 Bug 1639570 - Implement nsICookieService::getCookieStringFromDocument - part 1 - implementation, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D76142
2020-05-27 10:15:21 +00:00
Dorel Luca
34b793064e Backed out 6 changesets (bug 1638711) for Geckoview failures in NavigationDelegateTest.loadUriReferrerSessionFileUrl.CLOSED TREE
Backed out changeset 22a7b8f16c44 (bug 1638711)
Backed out changeset 75d97b8df5ba (bug 1638711)
Backed out changeset 254871b49de9 (bug 1638711)
Backed out changeset 97d1d2390586 (bug 1638711)
Backed out changeset bebe76fca022 (bug 1638711)
Backed out changeset 164b842bea99 (bug 1638711)
2020-05-27 12:28:10 +03:00
Matt Woodrow
edc0d0a35f Bug 1638711 - Do document security checks in parent process. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75720
2020-05-27 00:32:05 +00:00
Matt Woodrow
e060a86c42 Bug 1631405 - Move nsISecureBrowserUI to be owned by the canonical browsing context instead of docshell. r=nika,ckerschb,Gijs,webcompat-reviewers,twisniewski
This removes all docshell nsISecureBrowserUI and mixed content properties, and moves them into CanonicalBrowsingContext/WindowGlobalParent. It makes the mixed content blocker just compute the state for the current load, and then send the results to the parent process, where we update the security state accordingly.

I think we could in the future remove onSecurityChange entirely, and instead just fire an event to the <browser> element notifying it of changes to the queryable securityUI.

Unfortunately we have a lot of existing code that depends on specific ordering between onSecurityChange and onLocationChange, so I had to hook into the RemoteWebProgress implementation in BrowserParent to mimic the same timings.

Differential Revision: https://phabricator.services.mozilla.com/D75447
2020-05-27 00:28:59 +00:00
Chris Fronk
0752132932 Bug 1620369 Convert Cache Deleter to use background thread pool r=necko-reviewers,michal
Differential Revision: https://phabricator.services.mozilla.com/D74577
2020-05-27 00:05:58 +00:00
Chris Fronk
39313c3fb4 Bug 1620366 - Convert BackgroundFileSaver to use background thread pool. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D74546
2020-05-27 00:06:16 +00:00
Bogdan Tara
a54ec3073f Backed out 4 changesets (bug 1631405) for multiple mochitest failures CLOSED TREE
Backed out changeset 9963cc0b23cb (bug 1631405)
Backed out changeset 469ac933ed7c (bug 1631405)
Backed out changeset 0c5f55864268 (bug 1631405)
Backed out changeset 20dcbcc2f3b8 (bug 1631405)
2020-05-27 01:30:20 +03:00
Matt Woodrow
240d417eb6 Bug 1631405 - Move nsISecureBrowserUI to be owned by the canonical browsing context instead of docshell. r=nika,ckerschb,Gijs,webcompat-reviewers,twisniewski
This removes all docshell nsISecureBrowserUI and mixed content properties, and moves them into CanonicalBrowsingContext/WindowGlobalParent. It makes the mixed content blocker just compute the state for the current load, and then send the results to the parent process, where we update the security state accordingly.

I think we could in the future remove onSecurityChange entirely, and instead just fire an event to the <browser> element notifying it of changes to the queryable securityUI.

Unfortunately we have a lot of existing code that depends on specific ordering between onSecurityChange and onLocationChange, so I had to hook into the RemoteWebProgress implementation in BrowserParent to mimic the same timings.

Differential Revision: https://phabricator.services.mozilla.com/D75447
2020-05-26 21:17:01 +00:00
Matt Woodrow
38ffa87e05 Bug 1640160 - Serialize mRequestContextId with BrowsingContext's IPCInitializer to ensure that we don't try to create a request context with an id of 0. r=nika
This was a bit of pain to track down, because some code was allowing an ID of 0, and creating a request context to match, but other code was treating 0 as invalid.

Differential Revision: https://phabricator.services.mozilla.com/D76652
2020-05-26 21:14:27 +00:00
Kagami Sascha Rosylight
236de553f6 Bug 1466532 - Part 1: Drop nsIFile::followLinks r=froydnj,necko-reviewers,dragana
This drops `followLinks` as 1) it has been no-op on UNIX for a long time and 2) its Windows implementation never had a proper symlink support.

Differential Revision: https://phabricator.services.mozilla.com/D75569
2020-05-26 20:51:16 +00:00
ffxbld
b3c5906f23 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D76710
2020-05-26 14:53:18 +00:00
Kershaw Chang
8ac1a956ac Bug 1602832 - P6: Make sure we don't launch socket process for xpcshell http server r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D76664
2020-05-26 14:30:54 +00:00
Kershaw Chang
b8de602ab2 Bug 1602832 - P5: Make sure ChildDNSService is created on main thread r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D72611
2020-05-26 14:30:47 +00:00
Kershaw Chang
104bf647be Bug 1602832 - P3: Skip failed tests r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67448
2020-05-26 14:30:26 +00:00
Kershaw Chang
eb032f3176 Bug 1602832 - P1: Run xpcshell tests without e10s with socket process r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D58110
2020-05-26 14:30:09 +00:00
Sebastian Streich
47570a169b Bug 1633710 - Move js uri.AsciiHost to principal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73239
2020-05-26 11:58:06 +00:00
JulianWels
2cc2e49495 Bug 1625156 - Error page for HTTPS Only Mode. r=fluent-reviewers,ckerschb,nhnt11,flod,nika,johannh,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72129
2020-05-26 11:45:21 +00:00
Butkovits Atila
f167b5c275 Backed out 6 changesets (bug 1602832) for causing perma failure at test_trr_case_sensitivity.js. CLOSED TREE
Backed out changeset 0e9c378df995 (bug 1602832)
Backed out changeset 534fedb3836e (bug 1602832)
Backed out changeset db012c05d64e (bug 1602832)
Backed out changeset ca0c207dca21 (bug 1602832)
Backed out changeset bea1f3aeea49 (bug 1602832)
Backed out changeset 2d54acd78124 (bug 1602832)
2020-05-26 13:09:07 +03:00
Kershaw Chang
8def6e94e6 Bug 1602832 - P6: Make sure we don't launch socket process for xpcshell http server r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D76664
2020-05-26 08:35:54 +00:00
Kershaw Chang
3412834247 Bug 1602832 - P5: Make sure ChildDNSService is created on main thread r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D72611
2020-05-26 08:35:47 +00:00
Kershaw Chang
52a180d403 Bug 1602832 - P3: Skip failed tests r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67448
2020-05-26 08:35:32 +00:00
Kershaw Chang
ad95a84c3b Bug 1602832 - P1: Run xpcshell tests without e10s with socket process r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D58110
2020-05-26 08:35:02 +00:00
Butkovits Atila
1d2238af48 Backed out 2 changesets (bug 1620679) for perma Reftest failure. CLOSED TREE
Backed out changeset 8190c67514cc (bug 1620679)
Backed out changeset 4ca2912d7421 (bug 1620679)
2020-05-26 10:58:42 +03:00
Dimi Lee
1bd66e58e7 Bug 1637634 - Update IsOnContentBlockingAllowList in nsHttpChannel::AsyncOpen r=timhuang,necko-reviewers
This patch removes the assertion that ensures the channel is
top-level via BrowsingContext.
This is because more than one testcases creates a TYPE_DOCUMENT channel
to test.

Differential Revision: https://phabricator.services.mozilla.com/D76152
2020-05-26 06:52:39 +00:00
Matt Woodrow
3254d194e7 Bug 1620679 - Use web progress listener for detecting load end in reftest-content.js. r=kmag,tnikkel
The previous patch stops us from firing the load event if we abort a load. We have a few crashtests that abort loads (either by directly calling stop(), or by starting a new navigation before load completes).

This switches the reftest harness to use web progress to determine when we've finished loading a test.

Differential Revision: https://phabricator.services.mozilla.com/D73995
2020-05-26 03:08:53 +00:00
Csoregi Natalia
38116effd4 Backed out changeset 8d0d9cb87686 (bug 1466532) for failures on test_file_protocol.js. CLOSED TREE 2020-05-26 01:46:49 +03:00
Csoregi Natalia
60c1f31133 Backed out changeset b42b355fc457 (bug 1637634) for crashes on UpdateIsOnContentBlockingAllowList. CLOSED TREE 2020-05-25 23:54:18 +03:00
Dimi Lee
ddefdeef9b Bug 1639140 - Remove HasStoragePermissionInParent in DocumentLoadListener r=timhuang,necko-reviewers a=reland CLOSED TREE
We don't need to call this API in DocumentLoadListener::AsyncOpen because we have
already called this in nsHttpChannel::AsyncOpen

Differential Revision: https://phabricator.services.mozilla.com/D76275
2020-05-22 07:32:22 +00:00
Noemi Erli
a10ab58b99 Backed out changeset 48b3b92e77f5 (bug 1639140) for causing xpcshell failures CLOSED TREE 2020-05-25 22:35:07 +03:00
Kagami Sascha Rosylight
b712a9333b Bug 1466532 - Part 1: Drop nsIFile::followLinks r=froydnj,necko-reviewers,dragana
This drops `followLinks` as 1) it has been no-op on UNIX for a long time and 2) its Windows implementation never had a proper symlink support.

Differential Revision: https://phabricator.services.mozilla.com/D75569
2020-05-25 18:55:59 +00:00
Dimi Lee
ed4c44789a Bug 1637634 - Update IsOnContentBlockingAllowList in nsHttpChannel::AsyncOpen r=timhuang,necko-reviewers
This patch removes TYPE_DOCUMENT test in test_shouldclassify because the
testcase creates a non-top level channel with TYPE_DOCUMENT flag (this is wong!),
which triggers the assertion in UpdateIsOnContentBlockingAllowList.

File a follow-up bug 1640715 to add TYPE_DOCUMENT test back.

Differential Revision: https://phabricator.services.mozilla.com/D76152
2020-05-25 18:30:43 +00:00
Dimi Lee
d2c1b033d5 Bug 1639140 - Remove HasStoragePermissionInParent in DocumentLoadListener r=timhuang,necko-reviewers
We don't need to call this API in DocumentLoadListener::AsyncOpen because we have
already called this in nsHttpChannel::AsyncOpen

Differential Revision: https://phabricator.services.mozilla.com/D76275
2020-05-22 07:32:22 +00:00
Valentin Gosu
e73971d1e6 Bug 1635566 - TRR: Perform a case-insensitive match for the host name r=necko-reviewers,dragana
This is according to RFC 4343 : Domain Name System (DNS) Case Insensitivity Clarification

Differential Revision: https://phabricator.services.mozilla.com/D75081
2020-05-25 13:06:36 +00:00
Valentin Gosu
88b4cf197a Bug 1635566 - TRR: lowercase cname after reading it from the packet r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D75079
2020-05-25 13:06:23 +00:00
Valentin Gosu
d68d384a5d Bug 1635566 - Create reusable code for running TRR tests in a separate node container r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D75078
2020-05-25 13:06:11 +00:00
Kershaw Chang
80a7a8303b Bug 1546358 - Forward cache entry check to parent process r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D75941
2020-05-25 11:07:07 +00:00
Christoph Kerschbaumer
6ae4ad1947 Bug 1422284 - Upgrade insecure requests should only apply to top-level same-origin redirects. r=baku,valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75259
2020-05-25 08:14:10 +00:00