Граф коммитов

5438 Коммитов

Автор SHA1 Сообщение Дата
Dylan Roeh ee984e1e49 Bug 1478171 - [1.0] Forward channel redirect to nsILoadURIDelegate to allow external handling. r=smaug,snorp 2018-08-21 12:52:39 -05:00
Cosmin Sabou ed624fa8d0 Backed out 6 changesets (bug 1484876) for eslint failure on PrivateBrowsingUtils. CLOSED TREE
Backed out changeset e80737d6af55 (bug 1484876)
Backed out changeset b1cb63d8c8bb (bug 1484876)
Backed out changeset cd2ced689895 (bug 1484876)
Backed out changeset d31e39a47704 (bug 1484876)
Backed out changeset babf6abc7f4c (bug 1484876)
Backed out changeset 1c9895ab06c6 (bug 1484876)
2018-08-22 16:26:33 +03:00
Ehsan Akhgari c4e0a11824 Bug 1484876 - Part 3: Refactor the code responsible for checking whether the top window URI is on the content blocking allow list into AntiTrackingCommon; r=francois 2018-08-22 09:08:10 -04:00
Ehsan Akhgari 57a5790ea9 Bug 1484876 - Part 2: Check the trackingprotection-pb permission in the channel classifier code instead of accessing nsIPrivateBrowsingTrackingProtectionWhitelist; r=francois 2018-08-22 09:08:10 -04:00
Tiberius Oros 05b46cf200 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-22 00:59:19 +03:00
Honza Bambas 0a40274f51 Bug 1469117 - Make sure we reset network socket timeout epoch to 0 when timeout on a socket is turned off r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D3880

--HG--
extra : moz-landing-system : lando
2018-08-21 14:33:52 +00:00
Henri Sivonen 57d5f3ee13 Bug 1484984 - Avoid writing past the logical length of a string in networking code. r=valentin
MozReview-Commit-ID: IIffoxnF6KS

Differential Revision: https://phabricator.services.mozilla.com/D3884

--HG--
extra : moz-landing-system : lando
2018-08-21 14:20:48 +00:00
Daniel Stenberg 8225a95bbd bug 1483311 - add LOAD_DISABLE_TRR as a loadflag r=mcmanus
Disable TRR at will without needing to toggle the pref.

MozReview-Commit-ID: 1Ept6kDrjN3

Differential Revision: https://phabricator.services.mozilla.com/D3399

--HG--
extra : moz-landing-system : lando
2018-08-20 22:02:04 +00:00
Ehsan Akhgari 12e9766425 Bug 1484868 - Add the nsIPermissionManager::removeByType() API; r=nika 2018-08-21 15:10:13 -04:00
Francois Marier 309a23afc3 Bug 1482950 - Use the correct 3rdparty check in tracking annotations. r=dimi,Ehsan,mayhemer!,ehsan!
The mIsTrackingResource flag on nsIHttpChannel was split into two separate
flags depending on whether or not the resource is third-party. The correct
flag will be set by the channel classifier. Similarly, a new function was
introduced, GetIsThirdPartyTrackingResource(), for those consumers (like TP)
who only care about third-party trackers.

The existing function, GetIsTracking(), will continue to look at both
first-party and third-party trackers (the behavior since first party
tracking was added to annotations in bug 1476324).

The OverrideTrackingResource() function now allows nsHTMLDocument to
override both mIsFirstPartyTrackingResource and
mIsThirdPartyTrackingResource, but since this function is a little dangerous
and only has a single user, I added an assert to make future callers think
twice about using it to opt out of tracking annotations.

Currently, only the default storage restrictions need to look at first-party
trackers so every other consumer has been moved to
mIsThirdPartyTrackingResource or GetIsThirdPartyTrackingResource().

This effectively reverts the third-party checks added in bug 1476715 and
replaces them with the more complicated check that was added in bug 1108017.
It follows the approach that Ehsan initially suggested in bug 1476715. It
also reverts the changes in the expected values of the tracking annotation
test since these were, in hindsight, a warning about this regression.

Depends on D3722

Differential Revision: https://phabricator.services.mozilla.com/D3723

--HG--
extra : moz-landing-system : lando
2018-08-20 23:53:45 +00:00
Alphan Chen 4b85350209 Bug 1469348 - Fix the problem of download file failed on Mac. r=paolo
In this bug, we will focus on the problem of cannot download PDF file from google drawing successfully on MAC.

After investigating, I found that "SetTarget()" is called twice with two different addresses.
However, they both point to the same file.
We will assign the first target to "mInitialTarget" and the second one to "mRenamedTarget".

This problem happened when doing the second "SetTarget()".
After canceling the existing AsyncCopy, we will schedule a new AsyncCopy.
However, we only assign the mActualTarget with mRenamedTarget when they point to different files.
In this case, the two different addresses point to the same file.
So the mActualTarget is still the same as mInitialTarget.

After completion of the AsyncCopy, we try to do "CheckCompletion".
But it will always return false due to "mRenamedTarget exists" and "mActualTarget" is not the same as "mRenamedTarget".

The solution is quite easy.
We should always update mActualTarget with renameTarget, even if they point to the same file.

Differential Revision: https://phabricator.services.mozilla.com/D3400

--HG--
extra : moz-landing-system : lando
2018-08-17 16:40:02 +00:00
Valentin Gosu 20d09475cd Bug 1483445 - Change string from tracking protection to content blocking r=dragana!
Differential Revision: https://phabricator.services.mozilla.com/D3440

--HG--
extra : moz-landing-system : lando
2018-08-20 08:43:08 +00:00
Liang-Heng Chen 39358a724e Bug 1481252 - Part 2: Report Tracking Protection status to docshell; r=valentin,francois
Differential Revision: https://phabricator.services.mozilla.com/D3025

--HG--
extra : moz-landing-system : lando
2018-08-13 10:23:57 +00:00
Liang-Heng Chen 6c9d7c21d6 Bug 1481252 - Part 1: Report FastBlock status to docshell; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D3024

--HG--
extra : moz-landing-system : lando
2018-08-16 15:29:22 +00:00
Ehsan Akhgari 33ea2d0935 Bug 1480923 - Part 2: Remove the checks for the restrict3rdpartystorage pref from the channel classifier and only rely on the annotate_channels pref; r=francois 2018-08-15 12:54:58 -04:00
Ehsan Akhgari 8cbcaae11f Bug 1480923 - Part 1: Remove the centralized third-party checks from nsChannelClassifier::ShouldEnableTrackingProtectionInternal in annotation-only mode; r=francois 2018-08-15 12:54:57 -04:00
Brian Hackett 60fcac25d8 Bug 1481353 - Record refcount changes on a couple of stream classes, r=froydnj.
--HG--
extra : rebase_source : b78292b5ddba0397c8289cca9262d5dd27491029
2018-08-14 00:42:19 +00:00
Daniel Varga 9355025fd5 Merge mozilla-central to mozilla-inbound 2018-08-14 01:09:48 +03:00
Andrea Marchesini d1e5833a37 Bug 1480780 - Merge the privacy.3rdpartystorage.enabled pref with the network.cookie.cookieBehavior pref; r=ehsan
This patch introduces a new cookie behavior policy called
BEHAVIOR_REJECT_TRACKER.  It also makes it possible to override that
behavior with cookie permissions similar to other cookie behaviors.
2018-08-13 16:01:16 -04:00
Adrian Wielgosik be0c1a4f55 Bug 1481645 - Remove some redundant uses of do_QueryInterface. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2893

--HG--
extra : moz-landing-system : lando
2018-08-13 09:05:19 +00:00
Andrea Marchesini 04fcbb6556 Bug 1480131 - AntiTrackingCommon::IsFirstPartyStorageAccessGrantFor() should not grant permission to sub-sub-iframe channels; r=ehsan 2018-08-10 14:59:33 -04:00
Jan de Mooij 729eb9343a Bug 1480678 part 10 - Remove unnecessary realm entering in TCPSocket::Send. r=bz 2018-08-09 10:48:29 +02:00
Jean-Yves Avenard 35a7076534 Bug 1481176 - P1. Export GetParameterHTTP as static method. r=valentin,r=bzbarsky
nsContentTypeParser used internally a nsIMIMEHeaderParam reference, effectively limiting its use on the main thread, and as such restricting any methods handling mime type there too.

nsContentTypeParser only made use of a single method nsMIMEHeaderParamImpl::GetParameterHTTP, so we make that method static and export it via nsNetUtil.

Differential Revision: https://phabricator.services.mozilla.com/D2788
2018-08-07 19:21:58 +02:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Andrea Marchesini d7df3bf81e Bug 1476715 - low priority connection for 3rd party + tracking resource only, r=francois 2018-08-06 13:42:43 +02:00
Jeremy Lempereur e8a7f0b917 Bug 1481016 - Network, use inherent rust methods instead of deprecated std::ascii:AsciiExt ones, r=valentin
MozReview-Commit-ID: F1NGG0q6WdS

--HG--
extra : rebase_source : 077684b197d23f9893048c977f1d3ca2e97b5136
2018-08-04 20:24:59 +02:00
Jan de Mooij 3af36d3d86 Bug 1479363 part 10 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in other directories. r=mrbkap 2018-08-02 19:30:17 +02:00
Cosmin Sabou de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
dvarga 09eac64963 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-02 01:19:44 +03:00
Jorg K ba1be252a0 Bug 1478441 - Introduce nsIURIWithSpecialOrigin needed for Thunderbird. r=baku 2018-07-31 11:27:00 +03:00
Francois Marier 9f161ab08f Bug 1461515 - Split tracking annotations from tracking protection. r=dimi
This makes it possible to use different lists for tracking protection
and for the features that rely on tracking annotations.

Differential Revision: https://phabricator.services.mozilla.com/D2484

--HG--
extra : moz-landing-system : lando
2018-08-01 20:45:41 +00:00
Andrea Marchesini 44ce53c72e Bug 1476592 - Remove the cache from nsCSPContext - part 2 - sendViolationReports parameter, r=ckerschb, r=aosmond 2018-08-01 06:35:24 +02:00
Cosmin Sabou bfc1e72e01 Backed out changeset 9035ff3757ac (bug 1415980) at request from froydnj on the suspicion that it's going to break MSVC builds when it gets merged to central. 2018-07-31 01:19:49 +03:00
Nathan Froyd 017b016850 Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr.  But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us).  Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle
   that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the place.
Additionally, if moving entries is implemented via memcpy (which is
quite common), PLDHashTable copying around bits *again* is inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement).  In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

   This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead
   of copy constructors.  Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-07-30 17:15:11 -04:00
Makoto Kato e788340ea4 Bug 1462019 - Part 1. Support abstract socket address on nsIServerSocket and nsISocketTransportService. r=mayhemer 2018-07-26 18:06:42 +09:00
Jan de Mooij 80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Dipen Patel 7641beb1f8 Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL

--HG--
extra : rebase_source : 9c400bed3c9d29a186fc987c9bd0ffceb37bfd94
2018-07-13 11:48:55 -07:00
Andreea Pavel d0f6470c17 Backed out changeset c235d6f86c22 (bug 1475647) for breaking firefox ui at testing/firefox-ui/tests/puppeteer/test_tabbar.py on a CLOSED TREE 2018-07-25 19:34:58 +03:00
Dipen Patel 8670057dd5 Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL

--HG--
extra : rebase_source : fbfbcf7608efbfb35c9be4018ff0f4e70b2768d2
2018-07-13 11:48:55 -07:00
Andrea Marchesini f6768a8ff6 Bug 1228139 - Remove nsIURIWithPrincipal - part 3 - main part, r=bz
nsIURIWithPrincipal is currently used to retrieve the nsIPrincipal from a
BlobURL object.  BlobURLProtocolHandler has a hashtable containing, for each
blobURL, a BlobImpl and its nsIPrincipal. This patch introduces
BlobURLProtocolHandler::GetBlobURLPrincipal() that retrieves the nsIPrincipal
from this hashtable.

This patch fixes also a bug in how the revocation of blobURLs is broadcasted to
other processes. This should be done immediately because each process creates
its own timer to revoke them after 5 seconds.

An important change is related to NS_SecurityCompareURIs() where, if 1 (or
both) of the 2 URIs to compare, is a revoked BlobURL, we will QI its URL to
nsIStandardURL and fail out at that point.
2018-07-24 22:15:57 +02:00
Byron Campen [:bwc] 721e2034d6 Bug 1448846: Ignore POLLERR on UDP sockets. r=dragana
MozReview-Commit-ID: 1FxhHbH8Neg

--HG--
extra : rebase_source : e50fbde7c3d52141dfb29a9805a00cec9be633ca
2018-07-02 11:52:02 -05:00
Valentin Gosu 7937c7c4cc Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu
The patch introduces NS_GetURIWithNewRef and NS_GetURIWithNewRef which perform the same function.

Differential Revision: https://phabricator.services.mozilla.com/D2239

--HG--
extra : moz-landing-system : lando
2018-07-23 11:28:47 +00:00
Cosmin Sabou b5b2c78493 Merge mozilla-central to autoland. a=merge 2018-07-21 00:48:28 +03:00
Michael Kaply 96e550bb6b Bug 1477076 - Add POST support to addEngineWithDetails. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D2254

--HG--
extra : moz-landing-system : lando
2018-07-20 18:40:00 +00:00
Christoph Kerschbaumer adac33969a Bug 1304645: Pass individual CSP errors as categories to web console error messages. r=baku 2018-07-20 19:57:21 +02:00
Andreea Pavel b5a482c899 Backed out 3 changesets (bug 1475073, bug 1304645, bug 1474537) for failing wpt and mochitest on a CLOSED TREE
Backed out changeset 4fbeea69b10d (bug 1475073)
Backed out changeset d3ac68d9ead9 (bug 1304645)
Backed out changeset 113b601a3b59 (bug 1474537)
2018-07-20 14:00:09 +03:00
Christoph Kerschbaumer 1de27c0297 Bug 1304645: Pass individual CSP errors as categories to web console error messages. r=baku 2018-07-20 10:42:46 +02:00
Andrea Marchesini 3003d70341 Bug 1476324 - Storage activation via window.open(URL) applies across top-level domains - part 3 - annotate top-level channels, r=ehsan 2018-07-18 15:44:55 +02:00
Eric Rahm a064f414e3 Bug 1448034 - Part 2: Lazily create ProxyResolution thread. r=bagder
This delays the creation of the PAC thread until we need to dispatch a
runnable to it.

--HG--
extra : rebase_source : 8897d3d8724f082ad33027635795512ccb4a17eb
extra : source : 068bb4e7b8494d8ae82dfd1b1f22680234bf038c
2018-07-16 16:05:39 -07:00