From 959f68b520009de2804c901af86913bd582e8c28 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 25 Feb 2026 14:43:47 -0800 Subject: [PATCH] Restrict cidr resource --- server/private/routers/ssh/signSshKey.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/private/routers/ssh/signSshKey.ts b/server/private/routers/ssh/signSshKey.ts index fbdee72d..13a7fe66 100644 --- a/server/private/routers/ssh/signSshKey.ts +++ b/server/private/routers/ssh/signSshKey.ts @@ -310,6 +310,15 @@ export async function signSshKey( ); } + if (resource.mode == "cidr") { + return next( + createHttpError( + HttpCode.BAD_REQUEST, + "SSHing is not supported for CIDR resources" + ) + ); + } + // Check if the user has access to the resource const hasAccess = await canUserAccessSiteResource({ userId: userId,