Proxy.cgi : Error message when use wildcard in WPAD Excluded URL s

Since the upgrade from core version 170 I can no longer update the proxy settings
indeed, the interface refuses urls with wildcard that I had entered in previous versions in WPAD Excluded URL s
I get the error “Invalid url **”

I corrected in my /var/ipfire/

Line 764
-		$domainname = $1;
+		$domainname =~ s/^\*\.|\*//g;

that works !

If you can explain, why your version of function validwildcarddomainname($) is better and valid for the whole system, you are invited to send a patch. :wink:

More seriously:

  • why do you use “**”? Without the trailing ‘*’ the domain would be accepted.
  • changes in must be valid system-wide.

BTW: Welcome to our IPFire community.

thank you for your reply

Apparently the validwildcarddomainname($) function is only used for proxy.cgi and was added in this version 170

My explanation:

The proxy.pac file (wpad.dat

generated by ipfire contains only shExpMatch(url, …) arguments

in this case, to bypass the proxy you have to go through ‘*’

Example: If I block adult sites in url filter

and I still want to allow

  (shExpMatch(url, "**")) -> bypass works (i can access to

  (shExpMatch(url, "*")) -> bypass not working

To not use the ‘*’ at the end, the proxy.pac would have to be generated with

  (shExpMatch(host, "*")) -> bypass works

I don’t know how to send a patch, nor how to test the whole system.

best regards.

@pscar13 , your findings are right. :frowning:

I’ve made an annotation in the associated bugzilla case. I hope the correction finds its way in CU171.

Could you please try the suggested change?

Hi Bernhard,

I suspect that Michael and the others filter bugzilla to show newly raised bugs, for prioritisation and then probably sort all open bugs by change date so they can see if there are any important bugs.

That is what I do (so I can decide those bugs that are simple enough for me to work on) and the annotation you made does not show up in my lists and probably not in the devs bugzilla views either.

You could either re-open the bug (in my view not recommended in this case) or raise a new bug which you make a link to the closed bug you have highlighted.

Hi Adolf,

thanks for your hint.
I’ll open a new ticket.

EDIT: ticket #12937

1 Like

Thank you :+1: