From: Nick Mathewson Date: Tue, 4 Nov 2025 14:49:17 +0000 (-0500) Subject: HTTP CONNECT: Reject request trying to use Arti RPC. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=11542a3d04bb746e4d2ba83c3127f2e6b9292afc;p=thirdparty%2Ftor.git HTTP CONNECT: Reject request trying to use Arti RPC. --- diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c index 94df58628f..e99701db7a 100644 --- a/src/core/or/connection_edge.c +++ b/src/core/or/connection_edge.c @@ -3131,6 +3131,14 @@ connection_ap_process_http_connect(entry_connection_t *conn) goto err; } + /* Reject the request if it's trying to interact with Arti RPC. */ + char *rpc_hdr = http_get_header(headers, "Tor-RPC-Target: "); + if (rpc_hdr) { + tor_free(rpc_hdr); + errmsg = "HTTP/1.0 501 Not implemented (No RPC Support)\r\n"; + goto err; + } + /* Abuse the 'username' and 'password' fields here. They are already an * abuse. */ {