]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
HTTP CONNECT: Reject request trying to use Arti RPC.
authorNick Mathewson <nickm@torproject.org>
Tue, 4 Nov 2025 14:49:17 +0000 (09:49 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 4 Nov 2025 15:39:50 +0000 (10:39 -0500)
src/core/or/connection_edge.c

index 94df58628f61782c5aa5cd5e38e75af0e2235608..e99701db7a22833dcbcd0c5419884a3045206b6d 100644 (file)
@@ -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. */
   {