Skip to content
Snippets Groups Projects
Commit 3487593c authored by Dan Ballard's avatar Dan Ballard Committed by Pier Angelo Vendrame
Browse files

TB 42660: Disable ProxySelector.openConnectionWithProxy and NOPify CrashReporter.sendCrashReport

parent 418f62e2
No related branches found
No related tags found
1 merge request!1505BB/TB 43416: Rebased onto 135.0a1
......@@ -29,16 +29,19 @@ import java.util.List;
public class ProxySelector {
public static URLConnection openConnectionWithProxy(final URI uri) throws IOException {
final java.net.ProxySelector ps = java.net.ProxySelector.getDefault();
Proxy proxy = Proxy.NO_PROXY;
if (ps != null) {
final List<Proxy> proxies = ps.select(uri);
if (proxies != null && !proxies.isEmpty()) {
proxy = proxies.get(0);
}
}
return uri.toURL().openConnection(proxy);
// tor-browser#42660: This should not be used: it cannot safely get tor configs so would be a
// proxy bypass risk.
throw new IOException("openConnectionWithProxy disabled by tb-42660");
// final java.net.ProxySelector ps = java.net.ProxySelector.getDefault();
// Proxy proxy = Proxy.NO_PROXY;
// if (ps != null) {
// final List<Proxy> proxies = ps.select(uri);
// if (proxies != null && !proxies.isEmpty()) {
// proxy = proxies.get(0);
// }
// }
//
// return uri.toURL().openConnection(proxy);
}
public ProxySelector() {}
......
......@@ -169,6 +169,11 @@ public class CrashReporter {
@NonNull final File minidumpFile,
@NonNull final JSONObject extras)
throws IOException, URISyntaxException {
// tor-browser#42660: makeing a NOP
if (true) {
return GeckoResult.fromValue("0");
}
Log.d(LOGTAG, "Sending crash report: " + minidumpFile.getPath());
HttpURLConnection conn = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment