Nick Mathewson [Tue, 4 Nov 2025 15:10:54 +0000 (10:10 -0500)]
HTTP CONNECT: Warn on Proxy-Authorization in legacy format.
To avoid confusing with other apps, we want applications to
deliberately choose a format that indicates that they know they're using Tor
for isolation. That's "Basic" auth, with username "tor" and
password chosen for isolation.
Nick Mathewson [Tue, 4 Nov 2025 14:25:24 +0000 (09:25 -0500)]
HTTP CONNECT: Close silently under some circumstances.
Notably, we want to close silently if we get anything other than
a well-formed HTTP request that contains _either_ a CONNECT
command, or some other command with "Host" set to localhost.
This makes it harder for hostile webpages to use DNS rebinding to
probe for whether a Tor HTTP CONNECT proxy is running locally.
(Tor Browser already defends against this via Noscript,
but other browsers don't).
For more information see prop365, and torspec!437.
David Goulet [Thu, 2 Oct 2025 17:43:34 +0000 (13:43 -0400)]
ci: Pin TPA runners for now
For unknown reasons, the non TPA runners lead to this failure:
slow/process/callbacks:
FAIL ../../src/test/test_process_slow.c:157: assert(timer_tick_count OP_LT 10): 10 vs 10
FAIL ../../src/test/test_process_slow.c:188: assert(ret OP_EQ 0): -1 vs 0
FAIL ../../src/test/test_process_slow.c:240: assert(smartlist_len(process_data->stdout_data) OP_EQ 12): 0 vs 12
[callbacks FAILED]
slow/process/nonexistent_executable: Sep 30 13:29:58.340 [err] tor_assertion_failed_(): Bug: ../../src/core/mainloop/mainloop.c:750: shutdown_did_not_work_callback: Assertion line should be unreached failed; aborting. (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: Tor 0.4.8.18-dev: Assertion line should be unreached failed in shutdown_did_not_work_callback at ../../src/core/mainloop/mainloop.c:750: . Stack trace: (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(log_backtrace_impl+0x57) [0x5648f4b4fef7] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(tor_assertion_failed_+0x147) [0x5648f4b5d837] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x1b3676) [0x5648f4b0b676] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21482) [0x7f75a879c482] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x7f75a879cc1f] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x1b4024) [0x5648f4b0c024] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(run_main_loop_until_done+0x35) [0x5648f4b0fa45] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x81d3d) [0x5648f49d9d3d] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x82237) [0x5648f49da237] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x9aeb4) [0x5648f49f2eb4] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(testcase_run_one+0x72) [0x5648f49f2f82] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(tinytest_main+0x104) [0x5648f49f3814] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(main+0x493) [0x5648f49d32c3] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7f75a803724a] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f75a8037305] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(_start+0x21) [0x5648f49d33e1] (on Tor 0.4.8.18-dev )
It is unclear why this is being triggered only on 0.4.8 and non TPA runners
(not happening on main) thus for now pin the runners until we either figure
this one out or deprecate 0.4.8
Signed-off-by: David Goulet <dgoulet@torproject.org>
Nick Mathewson [Tue, 23 Sep 2025 15:44:28 +0000 (11:44 -0400)]
Bulletproof the "get_mozilla_ciphers" script
Reviewers have noted that the script's logic treats all "enabled"
flags in StaticPrefList.yaml (other than an explicit False) as True.
That's not so great, since the flag can also be a string, and we
don't necessarily want to treat all strings as meaning that a
ciphersuite is enabled. (Although we do in fact want to treat
the only string used in _current_ firefox git main that way.)
This change has no effect on the generated ciphers.inc.
I don't think any other entries use "Default" lke this, and the repetition
seems pointless. The historical context was broken off to keep the "main" part
short and tidy.
practracker: codecs.open -> io.open for python 3.14
codecs.open is now deprecated: https://docs.python.org/3.14/whatsnew/3.14.html.
it prints a DeprecationWarning which makes tests fail, and may be removed in
the future. io.open works on python 2 and 3