When Firefox hit version 100 (2022-03-08), some websites broke when parsing the three-digit version number. We could use Firefox’s site interventions to send a version 99 UA string to those sites, but we can’t override the UA for enterprise intranet sites we don't know about. So the "network.http.useragent.forceVersion" pref was added (in bug 1753805) to allow enterprise admins to force a version 99 UA string if needed.
Now that the Firefox 100 release is 14 months behind us and the next ESR (version 115) is riding the trains, we can confidently remove the pref. Enterprise admins using ESR will have another year of using the pref in ESR 115. Then they'll need to fix their intranet sites to work with Firefox 100+.
Differential Revision: https://phabricator.services.mozilla.com/D180302
The problem that the image element not being removed is that the tabId is missing.
To make tabId available for the web extensions, we need to provide nsILoadContext to hinted requests.
Differential Revision: https://phabricator.services.mozilla.com/D179924
This patch has three parts to it:
1) Use URI_DANGEROUS_TO_LOAD and URI_IS_UI_RESOURCE to ensure that
only safe about: documents get exempted. Confusingly, some of
the safe ones to exempt are the ones with the DANGEROUS flag.
With this change, we will no longer allow about:blank or
about:srcdoc to be exempted base on URI. If they are to be
exempted, it will need to be base on other information.
2) In Document::RecomputeResistFingerprinting we previously
deferred to a Parent Document if we had one, and either the
principals matched or we were a null principal.
We will do the same thing, except we will also defer to our
opener as well as the parent document. Now about:blank
documents can be exempted.
However, this deferral only works if the opener is
same-process. For cross-process openers, we make the decision
ourselves.
We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)
Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well. Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.
This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted. But an open tab for b.com
would be. And it might be hard to tell those two apart, or why
they behave differently.
The third part of the patch:
3) In LoadInfo we want to populate information down from the
opener to the popup. This is needed because otherwise a
cross-origin popup will not defer to its opener (because in
Fission they're in different processes) and will decide if
it should be exempted itself. It's the CookieJarSettings
object that prevents the cross-origin document from thinking
it should be exempted - CJS tells it 'No, you're a child
(either a subdocument or a popup) and if I say you don't get
an exemption, you don't.'
Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists. A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.
It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.
Differential Revision: https://phabricator.services.mozilla.com/D178866
This avoids potential issues where multiple OnDataAvailable callbacks or
similar could theoretically be called concurrently on different
StreamTransportService threads when targeting the STS - these cases will
now target a TaskQueue on the STS instead, structurally ensuring serial
execution.
Differential Revision: https://phabricator.services.mozilla.com/D179984
For mozvpn, the data received in network change event is "up", not "changed", so we should call VerifyTraffic for every event for safe.
This patch also reduces http2.ping-timeout and http2.ping-threshold, since the original values are too long.
Differential Revision: https://phabricator.services.mozilla.com/D179681
The problem that the image element not being removed is that the tabId is missing.
To make tabId available for the web extensions, we need to provide nsILoadContext to hinted requests.
Differential Revision: https://phabricator.services.mozilla.com/D179924
For mozvpn, the data received in network change event is "up", not "changed", so we should call VerifyTraffic for every event for safe.
This patch also reduces http2.ping-timeout and http2.ping-threshold, since the original values are too long.
Differential Revision: https://phabricator.services.mozilla.com/D179681
There is some OOM errors by `GeckoAppShell.getDNSDomains`. Since
`nsAndroidNetworkLinkService::GetDnsSuffixList` can returns `nsresult`, we
should return error instead of crash.
Differential Revision: https://phabricator.services.mozilla.com/D179791
It's not clear to me why specializing nsCOMPtr<nsISupports> is
particularly useful, and this removes a lot of code, bringing us closer
to unifying nsCOMPtr and RefPtr.
The changes in other places are needed because we used to allow
nsCOMPtr<nsISupports> to implicitly coerce to nsISupports even for
rvalue references.
0:47.88 /home/emilio/src/moz/gecko-4/netwerk/protocol/http/nsHttpActivityDistributor.cpp:121:11: error: conversion function from 'nsCOMPtr<nsISupports>' to 'nsISupports *' invokes a deleted function
0:47.88 nsCOMPtr<nsISupports>(do_QueryObject(channel)), aActivityType,
0:47.88 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0:47.88 /home/emilio/src/moz/gecko-4/obj-debug/dist/include/nsCOMPtr.h:764:3: note: 'operator nsISupports *' has been explicitly marked deleted here
0:47.88 operator T*() const&& = delete;
0:47.88 ^
0:47.88 /home/emilio/src/moz/gecko-4/netwerk/protocol/http/nsHttpActivityDistributor.cpp:29:57: note: passing argument to parameter 'aHttpChannel' here
0:47.88 nsHttpActivityDistributor::ObserveActivity(nsISupports* aHttpChannel,
0:47.88 ^
Which is not allowed for a good reason, generally.
Differential Revision: https://phabricator.services.mozilla.com/D179124
This patch reverts the fallback warning behaviour when a canary heuristic
was tripped. Instead of enabling TRR and failing DNS resolves if skip reason
is a canary code, we now leave it disabled and instead fail DNS resolves
that would have otherwise used TRR if it had been enabled.
Differential Revision: https://phabricator.services.mozilla.com/D179057
The change is intended to improve parsing of the content-length headers.
Specifically, it addresses the problem of handling multiple content-length values.
Differential Revision: https://phabricator.services.mozilla.com/D178370
This also cleans up some of the unnecessary flags & memebrs which were held
during the changes in bug 1818998. mSelf was unncessary as the runnable
reference will be keeping the instance alive for the same lifetime, and
mSocketThreadShutDown was redundant with !mInitialized.
This change will also fix a potential issue where the socket thread was not
being shut down when switching the browser into an offline state from
`profile-change-net-teardown`, which could've lead to thread leaks when the
browser is returned to an online state. The restore codepath, however, has
been dead for a long time so this is unlikely to be a real issue in practice.
Depends on D178867
Differential Revision: https://phabricator.services.mozilla.com/D178868