Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits: 400bfa13 by Pier Angelo Vendrame at 2025-04-03T18:38:46+02:00 Bug 41422: Disable viaduct.
Viaduct is an application services component for doing HTTP requests. We do not want to use any online service in Tor Browser, but to be on the safe side, we return an error shall even a request be attempted.
- - - - -
3 changed files:
- + projects/application-services/41422-disable-viaduct.diff - projects/application-services/build - projects/application-services/config
Changes:
===================================== projects/application-services/41422-disable-viaduct.diff ===================================== @@ -0,0 +1,13 @@ +diff --git a/components/viaduct/src/backend/ffi.rs b/components/viaduct/src/backend/ffi.rs +index cca6bc68f..5d11eb026 100644 +--- a/components/viaduct/src/backend/ffi.rs ++++ b/components/viaduct/src/backend/ffi.rs +@@ -37,6 +37,8 @@ macro_rules! backend_error { + pub struct FfiBackend; + impl Backend for FfiBackend { + fn send(&self, request: crate::Request) -> Result<crate::Response, Error> { ++ return Err(backend_error!("Viaduct is disabled in Tor Browser.")); ++ + use ffi_support::IntoFfi; + use prost::Message; + super::note_backend("FFI (trusted)");
===================================== projects/application-services/build ===================================== @@ -107,6 +107,7 @@ popd patch -p1 < $rootdir/ohttp-no-git.diff patch -p1 < $rootdir/bug40485-nimbus-fml-reproducibility.diff patch -p1 < $rootdir/offline-nimbus-fml.diff + patch -p1 < $rootdir/41422-disable-viaduct.diff gradle_flags="--offline --no-daemon" gradle $gradle_flags assembleRelease gradle $gradle_flags publish
===================================== projects/application-services/config ===================================== @@ -82,6 +82,7 @@ steps: - filename: glean-noop.diff - filename: a-s-noop.diff - filename: cargo-no-build.sh + - filename: 41422-disable-viaduct.diff
list_toolchain_updates: git_hash: 'v[% c("version") %]'
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/40...
tbb-commits@lists.torproject.org