From 8ec9d668d542e3f7775f2fd159c0879651ddc3be Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 21 Oct 2024 09:36:19 +0200 Subject: [PATCH] VSCode DDoS itself discovering ports for the tunnel feature (#231668) * VSCode DDoS itself discovering ports for the tunnel feature Fixes #230738 * Expand limit --- src/vs/workbench/api/node/extHostTunnelService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/api/node/extHostTunnelService.ts b/src/vs/workbench/api/node/extHostTunnelService.ts index 5e0e5cafa32..45ed7f54f27 100644 --- a/src/vs/workbench/api/node/extHostTunnelService.ts +++ b/src/vs/workbench/api/node/extHostTunnelService.ts @@ -105,6 +105,9 @@ export function loadConnectionTable(stdout: string): Record[] { } function knownExcludeCmdline(command: string): boolean { + if (command.length > 500) { + return false; + } return !!command.match(/.*\.vscode-server-[a-zA-Z]+\/bin.*/) || (command.indexOf('out/server-main.js') !== -1) || (command.indexOf('_productName=VSCode') !== -1);