From patchwork Thu Aug 5 13:28:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 4604 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GgTw02RGhz3xGv for ; Thu, 5 Aug 2021 13:28:48 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GgTvx1GHfz6Zb; Thu, 5 Aug 2021 13:28:45 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GgTvw5yG4z2xs0; Thu, 5 Aug 2021 13:28:44 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GgTvv05nRz2xLV for ; Thu, 5 Aug 2021 13:28:43 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GgTvt68TGz36m; Thu, 5 Aug 2021 13:28:42 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1628170122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hmT+8LjysVwLgYO7HZqFwHWChj8WZi3g0uzVo/9kXME=; b=z82RCmTjZyP0eG63DKicGqMZ0n93yd9sci0M3YdAL078Rsml3fKxg7cPSgVag2H8lG1Kf/ k1TCza3W/Z3m7CAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1628170122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hmT+8LjysVwLgYO7HZqFwHWChj8WZi3g0uzVo/9kXME=; b=d7ZaD7YSM0zTKcPsvG0E1JddvkjDXVKqVLhK0TLzIMA/VZiv/VsOASFJryY/8ttbHz+119 R8rs3WIHMImYvvOzs80sNphvdKdOynT9V0JLxhF37mrhTAK+Og+tlizUqFTVtj0PQbS2c8 6x5O2BBVKNxDsDNijBKEoqGco94rbdo7AputN6ejbasgwBS6x/JCg8YT12dTxo3wYOq9ZT iue2xSubDePOl6BzAg+AUVQwcQDpoAiZk//ygjQ6moHUrqXnLu9qovJfXSOQDH816/UcoP IZ8vq15gqf6brXoNcmH5NxFWOLKg0MDXBoZqn3291taqwlHVVzOicAlB/auNYQ== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 3/3] proxy.cgi: Use sane check for subnet Date: Thu, 5 Aug 2021 13:28:32 +0000 Message-Id: <20210805132832.7645-3-michael.tremer@ipfire.org> In-Reply-To: <20210805132832.7645-1-michael.tremer@ipfire.org> References: <20210805132832.7645-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- html/cgi-bin/proxy.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index b973a8ff7..966593e4d 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -2483,7 +2483,7 @@ sub check_acls s/^\s+//g; s/\s+$//g; if ($_) { - unless (&General::validipandmask($_)) { $errormessage = $Lang::tr{'advproxy errmsg invalid ip or mask'}; } + unless (&Network::check_subnet($_)) { $errormessage = $Lang::tr{'advproxy errmsg invalid ip or mask'} . ": $_"; } $proxysettings{'SRC_SUBNETS'} .= $_."\n"; } }