Commit graph

252 commits

Author SHA1 Message Date
Moonchild
c9d9616334 [network] Improve checks while parsing MIME parameters. 2023-04-13 09:23:30 +08:00
Moonchild
dc4bf9b823 Issue #2180 - Add pref to control NSS TLS 1.3 protocol downgrade sentinel 2023-03-29 11:05:16 +08:00
Moonchild
ca93d4b42d Issue #1831 - Add an option to enable TLS 1.3 "compatibility" mode.
Critical note: this potentially reduces the strength of TLS 1.3 and
should only be enabled if absolutely necessary to access a site.
A browser restart is required for the pref change to take effect as it
is set on NSS initialization.

Resolves #1831
2023-03-29 11:04:44 +08:00
Moonchild
525b4e1888 [network] Avoid queue manipulation inside a loop 2023-01-19 09:40:35 +08:00
Martok
a6a420259c Issue #2073 - m-c 1546500: Avoid dispatching synchronous thread shutdown runnables 2023-01-10 07:31:26 +08:00
Moonchild
c95a802078 Issue #2070 - When multiple HSTS headers are received, only consider the first.
This implements a plain interpretations of RFC 6797, which says to only consider
the first HSTS header.
This slightly conflicts with RFC 7230, which says that sending multiple headers
which can't be merged is illegal (except for a specific whitelist which HSTS isn't in),
so this situation should never occur in the first place (and would therefore not need
the explicit entry in RFC 6797).

It improves HSTS robustness dealing with non-compliant servers.

Resolves #2070
2022-12-30 09:21:48 +08:00
Moonchild
f54f007d47 [network] Align cookie checks with RFC 6265 (bis) 2022-12-16 11:25:15 +08:00
Moonchild
6a1e540412 [network] move some generic websocket code to the baseclass 2022-12-16 11:24:17 +08:00
Moonchild
6408291d76 [network] Fix Mac buffer overflow. 2022-11-25 11:43:19 +08:00
Moonchild
7fab5ebd11 WebSocketChannel::CleanupConnection should run on the socket thread 2022-11-25 11:42:30 +08:00
Moonchild
37f0199c79 [Network, DOM] Align our implementation with the current CORS/Fetch spec. 2022-11-25 11:41:52 +08:00
Moonchild
0a079c2b90 Issue #2024 - Part 2: Add wildcard to Access-Control-Allow-{Method|Headers}
For requests without credentials, add wildcard to Access-Control-Allow-Headers
and Access-Control-Allow-Method.

Resolves #2024
2022-11-10 14:54:54 +08:00
Moonchild
1868e88741 Fix some debug assertions.
refactored code porting in assertions causing debug build failures.
2022-10-06 10:26:38 +08:00
Moonchild
91b51a6509 [network] Reject cookies with no name and a __Secure- or __Host- prefix 2022-09-22 10:19:10 +08:00
Moonchild
5dfded811d Issue #80 - reinstated unified building for some large chunks of our code.
This should reduce compile complexity saving time and reducing linker stress.
2022-09-07 10:36:23 +08:00
Basilisk-Dev
b4c5ebf00a Issue #1991 - backport Mozilla bug 1266667 2022-09-01 10:18:39 +08:00
Job Bautista
faa778ec9d Issue #1975 - Implement Origin header CSRF mitigation.
Backported from Mozilla bug 446344.
2022-07-30 08:43:44 +08:00
Moonchild
991e2ffb4b [network] Clear PAC loader when the load failed 2022-07-05 17:24:31 +08:00
Moonchild
c43ed8d93e Issue #21 - Follow-up: Remove some left-over telemetry plumbing. 2022-06-27 21:48:09 +08:00
Job Bautista
54489c3029 Issue #326 - Part 4: Update Unicode data to release 10.0
genUnicodePropertyData.pl's output:
 unknown ICU script MASARAM_GONDI at ../tools/genUnicodePropertyData.pl line 442, <FH> line 2641.
 unknown ICU script SOYOMBO at ../tools/genUnicodePropertyData.pl line 442, <FH> line 2663.
 unknown ICU script ZANABAZAR_SQUARE at ../tools/genUnicodePropertyData.pl line 442, <FH> line 2679.
 Data for CharProp2 = 14864
 Data for FullWidth = 2176
 Data for FullWidthInverse = 2688
 Total data = 19728
2022-06-27 21:34:53 +08:00
Job Bautista
275ea2bcf5 Issue #326 - Part 1a: Update character property table generator script for Unicode 9, and adjust APIs to fit the new identifier-type property model
Backported from Mozilla bug 1281448.
2022-06-23 08:54:37 +08:00
Brian Smith
95f1786bb4 Issue #1905 - Part 4c - Follow Firefox and Safari in reporting "Intel" for Mac ARM64 devices. Based on Mozilla bug 1655285. 2022-06-22 09:00:31 +08:00
Moonchild
6b3ab70997 [network] Fix typo in nsSocketTransport2.cpp
Follow-up to 7322bc0e9df42bd43d84ec9be22b00c47a09f3d7
2022-05-31 09:42:37 +08:00
Moonchild
7f3a7225af [network] SocketTransport2 cleanup 2022-05-31 09:40:14 +08:00
Brian Smith
13fcc4a046 Issue #1829 - Revert "Issue #1751" 2022-05-04 09:40:24 +08:00
roytam1
9f078ac580 [network] fix build 2022-04-28 11:40:11 +08:00
Moonchild
eaf9e756a0 Issue #21 - Remove remaining telemetry structs, callers and flags. 2022-04-28 10:33:44 +08:00
Moonchild
8d800b1cb0 Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and
additional js module changes (next part).
2022-04-28 10:25:48 +08:00
Moonchild
d4eac725fd Issue #1877 - Resolve RELEASE_OR_BETA conditionals. 2022-04-21 21:46:47 +08:00
trav90
908d58ab7b Issue #1804 - Fix building with GCC 11 2022-04-19 22:05:31 +08:00
roytam1
94cafe3a4a Revert "[network] SocketTransport2 cleanup"
This reverts commit b924810a3e.
2022-03-28 22:56:47 +08:00
roytam1
1d6c0f2e87 Revert "[network] Improve thread-safety of cache entry handling."
This reverts commit 9299c2e2ea.
2022-03-28 22:56:14 +08:00
Moonchild
e45fbf91ce [Network] Add a socket thread check and early exit for corner cases. 2022-03-22 23:24:09 +08:00
Moonchild
398cb98445 [Network] Only call nsWSAdmissionManager::ConnectNext on the main thread. 2022-03-22 23:21:52 +08:00
Moonchild
232f5a4705 [network] cache memory reporter cleanup 2022-03-22 23:19:50 +08:00
Randell Jesup
562b04e5c0 [network] BackgroundFileSaver cleanup. 2022-03-22 23:18:26 +08:00
Moonchild
b924810a3e [network] SocketTransport2 cleanup 2022-03-22 23:16:37 +08:00
Moonchild
9299c2e2ea [network] Improve thread-safety of cache entry handling. 2022-03-22 23:11:34 +08:00
roytam1
f43ff83d54 backport Bug 1696685 - r=valentin,nika a=RyanVM 2021-12-14 23:10:15 +08:00
roytam1
0ffa8a018a backport Bug 1724233 - Make sure to run ConvertUTF8toACE before ConvertToDisplayIDN. r=dragana, a=RyanVM 2021-11-10 09:10:25 +08:00
roytam1
d025defb98 Bug 1606864 - Make mDoNotRetryToConnect atomic. r=decoder,dragana a=RyanVM
Bug 1712671 - Make nsSocketTransport2::m{Input/Output}StreamClosed atomic. r=kershaw,decoder a=RyanVM
2021-11-10 09:10:25 +08:00
roytam1
1920aae3dc Bug 1735152 - Avoid using NS_ADDREF in nsSocketTransport. r=dragana, a=RyanVM 2021-11-10 09:10:25 +08:00
roytam1
8fb608b22d remove OSX support 2021-11-10 09:10:25 +08:00
Moonchild
9aed4d8a38 [network] Use a proof of lock everywhere in cache v2. 2021-08-12 11:21:24 +08:00
Valentin Gosu
6b11c3f299 [network] Make CacheIOThread::ThreadFunc hold reference to thread. 2021-07-15 09:26:22 +08:00
Moonchild
43f7d3e27a [network] Add some sanity checks to deserialized nsStandardURLs
Note: C++ lambda expressions are actually useful for once.
2021-07-15 09:26:21 +08:00
Moonchild
0a42897070 [network] Stop blocking 10080
Port 10080 is shared by too many devices and services that do need http(s)
access, so this port should not be blacklisted by default.
2021-07-15 09:26:19 +08:00
Moonchild
3612f45a90 [network] Stop treating http and https as different for encoding schemes.
There is no reason to treat available encoding schemes for these protocols
differently.
2021-07-15 09:23:13 +08:00
Moonchild
ba00d14c12 Issue #1751 - Remove Mac code behind MOZ_WIDGET_TOOLKIT == 'cocoa' 2021-06-24 11:09:47 +08:00
Moonchild
98f29e4737 [network] Fix typo in port blocking range check.
This fixes a typo in 5e705bd5059da5b7a39e3a096b7c7f59cb466730
2021-05-14 00:21:36 +08:00