From patchwork Mon Dec 19 09:12:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6315 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 4NbDWG27Blz3xkD for ; Mon, 19 Dec 2022 09:12:42 +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 4NbDWD3YkvzDD; Mon, 19 Dec 2022 09:12:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4NbDWD2Yvxz2y9s; Mon, 19 Dec 2022 09:12:40 +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 4NbDWC6C2bz2xxL for ; Mon, 19 Dec 2022 09:12:39 +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 4NbDWC0kNgzBV; Mon, 19 Dec 2022 09:12:39 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1671441159; 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; bh=pCCubMzsjOkuDePa+HaIkwLryQLfOXe5NlNh9Wka2v0=; b=c8YL/fUTy82ZIANcAL+JXufv+3n3RI0FNIQfM8vnyZXL1Au/wcimbVw1C8FWbs9/6TfBr+ SFDPBzpoch6a8ZDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1671441159; 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; bh=pCCubMzsjOkuDePa+HaIkwLryQLfOXe5NlNh9Wka2v0=; b=CGrDOD5U4POSMjzbPtdb0ZwvbAlhPXBCOxdynBvp7AbeI5K917ZhmNxIrzUECcTAr+SmM4 SNotiM0WoYnm3dhcWd00K3/ezS60KywPlQQbyc84nRgPMb6OtHBFPIC3ZHruMfCYDa7mCf 4PYFuXHzebZlrsDNYP3fk0JJIcuNmeMYr3+7tpDSii1aqlMQf9vxhnFaXu6rOzLgvk7Tpk 6n3QkQ79qWxGgvonwFlXG446lvldxE9GQvYPldkTbZ4ZtTQaKiH3uwcOuuLar9GmhknLTy vr3GkoMpfPwEjqAjaOE34b9b4hx8qky7DdAq55z5kTlT1zMxZG9GR+izmtzzQg== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH v2] general-functions.pl: Fix for bug#12937 Date: Mon, 19 Dec 2022 10:12:36 +0100 Message-Id: <20221219091236.3427-1-adolf.belka@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: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - The check for validwildcarddomainname did not allow wildcards of the form *.ipfire.org* which is the example given on the proxy.cgi page for excluded url's for the wpad file. - A forum user sufferred from this problem and the bug was raised for it. https://community.ipfire.org/t/proxy-cgi-error-message-when-use-wildcard-in-wpad-excluded-url-s/8597 forum user has tested the patch change and confirmed it solves the problem. Fixes: Bug#12937 Suggested-by: Bernhard Bitsch Signed-off-by: Adolf Belka Reviewed-by: Bernhard Bitsch --- config/cfgroot/general-functions.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 98bedb4b9..d871025eb 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -760,7 +760,7 @@ sub validwildcarddomainname($) { my $domainname = shift; # Ignore any leading dots - if ($domainname =~ m/^\*\.(.*)/) { + if ($domainname =~ m/^\*\.([^\*]*)\*?/) { $domainname = $1; }