]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
general-functions.pl: Fix for bug#12937
authorAdolf Belka <adolf.belka@ipfire.org>
Mon, 19 Dec 2022 09:12:36 +0000 (10:12 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Wed, 18 Jan 2023 23:31:23 +0000 (23:31 +0000)
- 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 <bbitsch@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
config/cfgroot/general-functions.pl

index 98bedb4b91ca9e6151fff421bc34a910080c3cee..d871025eb657fe339f6542021c3855c4be113edf 100644 (file)
@@ -760,7 +760,7 @@ sub validwildcarddomainname($) {
        my $domainname = shift;
 
        # Ignore any leading dots
-       if ($domainname =~ m/^\*\.(.*)/) {
+       if ($domainname =~ m/^\*\.([^\*]*)\*?/) {
                $domainname = $1;
        }