Commit Graph

22209 Commits

Author SHA1 Message Date
Tim Huang
521d7a9cd7 Bug 1706615 - Part 7: Skip query stripping for redirects if the redirect URI is in the content blocking allow list. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D116114
2021-06-02 19:46:22 +00:00
Tim Huang
cf30dbb9b8 Bug 1706615 - Part 6: Perform a redirect to the unstripped URI if the loading channel is in the content blocking allow list. r=valentin,necko-reviewers
In order to respect the content blocking allow list permission, we have
to do an internal redirect to the unstripped URI. We can only do this by
using an internal redirect because the stripping was happened in loadURI
in the content process. At the moment, the content process doesn't know
the content blocking allow list principal for the cross-origin URI. So,
we don't know if we should skip the query stripping. To resolve this,
we have to redirect the chanell back to the unstripped URI in the parent
process where the permission is available.

Differential Revision: https://phabricator.services.mozilla.com/D116113
2021-06-02 19:46:21 +00:00
Tim Huang
0f49885a4b Bug 1706615 - Part 5: Preserve the original redirect URI when query stripping happens during redirects. r=valentin,necko-reviewers
The patch makes the original redirect URI to be preserved in the
loadInfo of the redirect channel when query stripping happens during
redirects.

Differential Revision: https://phabricator.services.mozilla.com/D116112
2021-06-02 19:46:21 +00:00
Tim Huang
d7220a241a Bug 1706615 - Part 1: Add a UnstrippedURI into the LoadInfo. r=valentin,necko-reviewers
This patch adds a UnstrippedURI into the LoadInfo. This attribute
represents the channel's URI has been stripped if this attributes is not
a nullptr.

Having this attribute allows us to be able to revert the query stripping
in the case where the loading channel is in the content blocking allow
list in the parent process.

In addition, this patch removes the main thread assertion in URIUtils
given that we've made the URL construction thread-safe. This will allow
us to be able to use nsIURI directly in ParentLoadInfoForwarderArgs.

Differential Revision: https://phabricator.services.mozilla.com/D116108
2021-06-02 19:46:19 +00:00
Dana Keeler
1b9fd10c83 Bug 1701192 - don't allow third-party loads to set HSTS state r=annevk,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D115715
2021-06-02 16:52:19 +00:00
lyavor
8c341a47c7 Bug 1709552 HTTPS-First: 4xx and 5xx error responses might need a downgrade. r=ckerschb,necko-reviewers,valentin,JulianWels
Differential Revision: https://phabricator.services.mozilla.com/D114749
2021-06-02 08:35:22 +00:00
Kershaw Chang
88318b537a Bug 1700857 - Add a pref to allow a user to use SOCKS5, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D116098
2021-06-02 08:05:23 +00:00
Valentin Gosu
ace4e67a15 Bug 1649124 - Trigger VPN_DETECTED platformIndications for Mozilla VPN r=necko-reviewers,kershaw
This change also records the VPN_DETECTED platform indication when the Mozilla VPN adapter is active. The same interface type (IF_TYPE_PROP_VIRTUAL - proprietary virtual interface) is commonly used for other VPN implementations, so this should cover more of our bases.

Additionaly we also detect this is one of the interfaces contains the string "VPN" in its FriendlyName or Description. We do this in order to detect less common VPN types.

This change means that users currently enrolled in doh-rollout that are running a VPN will not be using DoH. This is good as using DoH with a VPN might leak the user's real location by resolving domains differently. See bug 1628149 comment 27.

Differential Revision: https://phabricator.services.mozilla.com/D116463
2021-06-02 07:33:48 +00:00
Valentin Gosu
8e040a6163 Bug 1710045 - Static analysis auto fixes r=necko-reviewers,kershaw
Depends on D114718

Differential Revision: https://phabricator.services.mozilla.com/D115987
2021-06-01 07:24:02 +00:00
Valentin Gosu
3b09f173e0 Bug 1710045 - Use DataMutex in nsHttp::sAtomTable r=necko-reviewers,dragana
- Make nsHttp::ResolveAtom lazily initialize the static atom table if empty
- Use a DataMutex to ensure locked access to the atom table
- Use nsCString in nsHttpAtom so strings can be shared/reference counted
- Add atomic sTableDestroyed so we don't reinit the atom table during shutdown

Depends on D114717

Differential Revision: https://phabricator.services.mozilla.com/D114718
2021-06-01 07:24:02 +00:00
Valentin Gosu
9a478fef0f Bug 1710045 - Hold transaction lock instead of global nsHttp lock r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D114717
2021-06-01 07:24:01 +00:00
R. Martinho Fernandes
7ea1bcd018 Bug 1597600 - make certificate overrides depend on origin attributes r=keeler,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D91962
2021-06-01 06:55:07 +00:00
Matt Woodrow
c1f699cc3d Bug 1713489 - Record telemetry for how long we spend waiting on the main thread to process image preload network steps. r=bas,dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D116318
2021-05-31 22:44:18 +00:00
surajeet310
b792d6a0b8 Bug 1713522 - Removed else after return in nsHttpConnection.cpp r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D116396
2021-05-31 19:12:33 +00:00
Valentin Gosu
7c670aecf4 Bug 1708125 - Remove some remaining FTP references from the tree r=necko-reviewers,dragana,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D114067
2021-05-31 13:08:12 +00:00
Brindusan Cristian
2a324428d6 Backed out changeset 8fea79dcd428 (bug 1708125) for causing xpcshell failures in test_DownloadCore.js.
CLOSED TREE
2021-05-31 15:28:19 +03:00
Brindusan Cristian
6ac5d624e0 Backed out changeset 3dff613dd244 for causing failures in nsSocketTransport2.cpp.
CLOSED TREE
2021-05-31 15:24:58 +03:00
ffxbld
1037e442e6 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=jcristau
Differential Revision: https://phabricator.services.mozilla.com/D116365
2021-05-31 11:09:20 +00:00
Brindusan Cristian
ca49f15f7d Backed out 14 changesets (bug 1705659, bug 472823, bug 669675) as requested by valentin for causing regressions. CLOSED TREE
Backed out changeset d920aa17a468 (bug 669675)
Backed out changeset adad38c05584 (bug 1705659)
Backed out changeset 361c177ed131 (bug 1705659)
Backed out changeset 46e559f45338 (bug 1705659)
Backed out changeset 3c9556a8df55 (bug 1705659)
Backed out changeset a179695a56c9 (bug 1705659)
Backed out changeset e688986c7011 (bug 1705659)
Backed out changeset de990e6c944d (bug 1705659)
Backed out changeset 0ea348abee78 (bug 1705659)
Backed out changeset 2f0aacbd42b1 (bug 1705659)
Backed out changeset c977551bad6e (bug 1705659)
Backed out changeset 5449d9e08034 (bug 1705659)
Backed out changeset b6b51bc167ac (bug 1705659)
Backed out changeset 27e709923ecb (bug 472823)
2021-05-31 13:16:34 +03:00
Valentin Gosu
02335617c8 Bug 1708125 - Remove some remaining FTP references from the tree r=necko-reviewers,dragana,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D114067
2021-05-31 07:33:29 +00:00
Dorel Luca
211b017ce9 Backed out changeset 089c88b9657b (bug 1597600) for XPCshell failures in toolkit/components/cleardata/tests/unit/test_certs.js. CLOSED TREE 2021-05-29 23:31:00 +03:00
R. Martinho Fernandes
a9e55ea7fc Bug 1597600 - make certificate overrides depend on origin attributes r=keeler,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D91962
2021-05-29 19:34:35 +00:00
Kris Wright
e9dca94b9d Bug 1704887 - Discard results of RemoveElement for DelayedRunnable r=necko-reviewers,xpcom-reviewers,mccr8,valentin
This silences a lint error on the previous patches in the series.

Differential Revision: https://phabricator.services.mozilla.com/D113160
2021-05-28 19:05:29 +00:00
Andreas Pehrson
ca1c3d2196 Bug 1704887 - Remove assertions in OnDelayedRunnableRan. r=KrisWright,necko-reviewers,valentin
DelayedDispatch, in all current implementations, will set up a timer sync and
then Dispatch() a runnable. Since the timer is set up before the Dispatch, there
is a theoretical chance that the timer fires and dispatches a TimerEvent to the
target thread before DelayedDispatch managed to do so. When this happens the
internal DelayedDispatch runnable exits early, i.e., in practice it never runs.

The chance increases dramatically if the Dispatch() to the target in question is
tail dispatched, since the time between DelayedDispatch and the tail could be
non-trivial.

This patch removes the assert that checks that all DelayedRunnables that have
run have also been scheduled, since per the above no such guarantee exists.

Differential Revision: https://phabricator.services.mozilla.com/D112876
2021-05-28 19:05:29 +00:00
Dragana Damjanovic
c848257f16 Bug 1710821 - Enable HTTP/3 final version by default r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D114960
2021-05-28 15:33:55 +00:00
Kershaw Chang
f105e15988 Bug 1616239 - Enable http3 tests for asan, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D108635
2021-05-28 07:37:23 +00:00
ffxbld
1bf6f19298 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D116105
2021-05-27 14:31:44 +00:00
Sebastian Hengst
544a953b13 Backed out 3 changesets (bug 1710045) for failing GTest TestHttpResponseHead.atoms on Windows. CLOSED TREE
Backed out changeset b4f466ca314e (bug 1710045)
Backed out changeset 66364f605471 (bug 1710045)
Backed out changeset 84c30435445b (bug 1710045)
2021-05-27 14:41:22 +02:00
Valentin Gosu
2fdf31f593 Bug 1710045 - Static analysis auto fixes r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115987
2021-05-27 09:12:36 +00:00
Valentin Gosu
6cdbc0a967 Bug 1710045 - Use DataMutex in nsHttp::sAtomTable r=necko-reviewers,dragana
- Make nsHttp::ResolveAtom lazily initialize the static atom table if empty
- Use a DataMutex to ensure locked access to the atom table
- Use nsCString in nsHttpAtom so strings can be shared/reference counted
- Add atomic sTableDestroyed so we don't reinit the atom table during shutdown

Depends on D114717

Differential Revision: https://phabricator.services.mozilla.com/D114718
2021-05-27 09:12:35 +00:00
Valentin Gosu
b1214651bf Bug 1710045 - Hold transaction lock instead of global nsHttp lock r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D114717
2021-05-27 09:12:35 +00:00
Dragana Damjanovic
ec06ffa508 Bug 1712441 - Add test for the HTTP/3 upload time telemetry r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D115887
2021-05-27 06:59:53 +00:00
Dragana Damjanovic
b979646233 Bug 1712441 - Improve telemetry for the HTTP/3 upload time r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D115886
2021-05-27 06:59:53 +00:00
Iulian Moraru
38414bfb41 Backed out changeset 54267d9f3d78 (bug 1701192) for causing mochitest failures on test_hsts_upgrade_intercept.html. CLOSED TREE DONTBUILD 2021-05-27 03:17:12 +03:00
Dana Keeler
0c2f477cee Bug 1701192 - don't allow third-party loads to set HSTS state r=annevk,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D115715
2021-05-26 23:33:53 +00:00
Dragana Damjanovic
c6d06aa9ee Bug 1710387 - Improve check for Http3 support r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115513
2021-05-26 20:12:22 +00:00
Valentin Gosu
76cc18727f Bug 669675 - Use Tokenizer in ParseRealm r=necko-reviewers,dragana
We also import the testcases from http://test.greenbytes.de/tech/tc/httpauth/
as unit tests.

This patch adds a network.auth.use_new_parse_realm pref in case this change
causes any regressions.

Depends on D112605

Differential Revision: https://phabricator.services.mozilla.com/D112594
2021-05-26 09:27:21 +00:00
Valentin Gosu
69c6a23516 Bug 1705659 - Static-analysis check auto fix for auth code r=necko-reviewers,dragana
Depends on D112604

Differential Revision: https://phabricator.services.mozilla.com/D112605
2021-05-26 09:27:21 +00:00
Valentin Gosu
6f09c91ab7 Bug 1705659 - Make Host() and ProxyHost() return const nsCString& r=necko-reviewers,dragana
Depends on D112603

Differential Revision: https://phabricator.services.mozilla.com/D112604
2021-05-26 09:27:21 +00:00
Valentin Gosu
bd3417a5ff Bug 1705659 - nsHttpNTLMAuth::GenerateCredentials should avoid raw strings r=necko-reviewers,dragana
Depends on D112599

Differential Revision: https://phabricator.services.mozilla.com/D112601
2021-05-26 09:27:20 +00:00
Valentin Gosu
2c30f5a9d7 Bug 1705659 - Use a nsTArray<CString> instead of custom linked list r=necko-reviewers,dragana
Depends on D112598

Differential Revision: https://phabricator.services.mozilla.com/D112599
2021-05-26 09:27:19 +00:00
Valentin Gosu
1fb3a73493 Bug 1705659 - Make auth code use nsACString instead of raw char pointers r=necko-reviewers,dragana
Depends on D112597

Differential Revision: https://phabricator.services.mozilla.com/D112598
2021-05-26 09:27:19 +00:00
Valentin Gosu
38105346d1 Bug 1705659 - Make GetAuthenticator work with nsACString r=necko-reviewers,dragana
Depends on D112602

Differential Revision: https://phabricator.services.mozilla.com/D112597
2021-05-26 09:27:19 +00:00
Valentin Gosu
c37ea503a8 Bug 1705659 - Make nsHttpDigestAuth::ParseChallenge work with a nsACString without extra copy r=necko-reviewers,dragana
Depends on D112595

Differential Revision: https://phabricator.services.mozilla.com/D112602
2021-05-26 09:27:18 +00:00
Valentin Gosu
be9ba451de Bug 1705659 - Use Tokenizer in nsHttpChannelAuthProvider::GetCredentials r=necko-reviewers,dragana
- Also uses nsACString in nsHttpDigestAuth::ParseChallenge

Depends on D112912

Differential Revision: https://phabricator.services.mozilla.com/D112595
2021-05-26 09:27:18 +00:00
Valentin Gosu
ef03f15c50 Bug 1705659 - Use nsACString& in ParseRealm and GetCredentialsForChallenge r=necko-reviewers,dragana
- The use of PromiseFlatCString is temporary. It is removed in the next patches in the stack.

Depends on D112911

Differential Revision: https://phabricator.services.mozilla.com/D112912
2021-05-26 09:27:18 +00:00
Valentin Gosu
fa095ab9a3 Bug 1705659 - Make DigestLength a function r=necko-reviewers,dragana
Depends on D112596

Differential Revision: https://phabricator.services.mozilla.com/D112911
2021-05-26 09:27:17 +00:00
Valentin Gosu
e6f72c6341 Bug 1705659 - Modernize test_authentication.js r=necko-reviewers,dragana
Depends on D106241

Differential Revision: https://phabricator.services.mozilla.com/D112596
2021-05-26 09:27:17 +00:00
Glenn Strauss
988a105817 Bug 472823 - support SHA-256 HTTP Digest auth r=necko-reviewers,dragana
fixes:
Bug 472823 SHA 256 Digest Authentication
Original patch by Teun van Eijsden
Tests added by Vit Hampl <mozilla@bugear.com>
Original patch updated and tests fixed by gstrauss

fixes:
Bug 281851 CVE-2005-2395 Wrong scheme used when server offers both Basic and Digest auth

fixes:
Bug 669675 failure to skip unknown HTTP authentication schemes in WWW-Authenticate

Differential Revision: https://phabricator.services.mozilla.com/D106241
2021-05-26 09:27:16 +00:00
Dragana Damjanovic
4e508bd5ca Bug 1712440 - Update neqo to version 0.4.25 r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115758
2021-05-25 21:52:27 +00:00