Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy bypass list with "*" will return regex quantifier parsing errors #1532

Closed
ferventcoder opened this issue Apr 4, 2018 · 12 comments
Closed

Comments

@ferventcoder
Copy link
Member

ferventcoder commented Apr 4, 2018

Say you add "*.localhost.com" to the proxy bypass list. Instead of configuring it properly, it will return an error with "parsing "*.localhost.com" - Quantifier {x,y} following nothing."

@ferventcoder ferventcoder added this to the 0.10.10 milestone Apr 4, 2018
@ferventcoder ferventcoder self-assigned this Apr 4, 2018
ferventcoder added a commit that referenced this issue Apr 9, 2018
If someone adds a value with a wild card ("*") to the proxy bypass
list, instead of configuring it properly, it will return an error
instead:  "parsing "*.localhost.com" - Quantifier {x,y} following
nothing." When the wildcard is found, it needs to be converted to a
proper regext.
ferventcoder added a commit that referenced this issue Apr 9, 2018
* stable:
  (doc) update release notes
  (GH-1529) Fix: install of choco exit code 1
  (GH-1532) Fix: proxy bypass with "*" causes regex error
  (GH-1531) Hold exclusive locks on non-essential logs
  (maint) formatting
  (maint) update copyright for assemblies
  (GH-1527) Fix: NuGet cache removal fixes
  (GH-1527) Use machine temp with systemprofile
@johlandabee
Copy link

johlandabee commented Jul 18, 2018

I still get this error with 0.10.11. Wasn't the fix published with 0.10.10? The merge failed due to test coverage if Im not mistaken.

@ferventcoder What is the status on this?

@juspky
Copy link

juspky commented Jul 25, 2018

I also still get this error and this causes me a lot of problems.
Hope this will be fixed soon

@ferventcoder
Copy link
Member Author

@johlandabee interesting - I'll follow up on the issue you created as a followup.

This was definitely fixed and verified for 0.10.10 - no merge failed here.

@juspky
Copy link

juspky commented Sep 26, 2018

I'm running Chocolatey v0.10.11
It is definitely not working.

grafik

@jpi-seb
Copy link

jpi-seb commented Oct 29, 2018

I have the same error with Chocolatey v0.10.11 on Windows 10.

ERROR: Exception setting "BypassList": "parsing "*.xx.xxxxxxxx.xx" - Quantifier {x,y} following nothing." The install of f.lux.install was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\f.lux.install\tools\chocolateyinstall.ps1'. See log for details.

Workaround : remove NO_PROXY env var before choco execution
SET NO_PROXY=

@t0r0X
Copy link

t0r0X commented Mar 6, 2019

The documentation is very clear on this:
--proxy-bypass-list=VALUE ProxyBypassList - Comma separated list of regex locations to bypass on proxy. Requires explicity proxy (--proxy or config setting). Overrides the default proxy bypass list of ''. Available in 0.10.4+.

separated list of regex locations(!) Therefore the bypass expression --proxy-bypass-list='*.mycompany.tld' is wrong, and it should be --proxy-bypass-list='.*.mycompany.tld' (note the dot character before the asterisk).

So, in my opinion, this should not be fixed.

@johlandabee
Copy link

@t0r0X Actually, most implementations do use globbing and not regex to match no_proxy entries. Infact, your example does not work for such, as it will match .xxx.mycompany.tld but not xxx.mycompany.tld. Changing the entries would probably work for chocolatey, but break other apps. Furthermore, .*.mycompany.tld means, the dots match any character. To make this technically correct, you'd have to escape them (.*\.mycompany\.tld) which would - yet again - not work for other applications.

@ferventcoder
Copy link
Member Author

@johlandabee please open a new issue related to this. Can I ask that if you set the proxy bypass list INSIDE of chocolatey configuration whether it works with the regex described? And yes, . would match any character, including the literal .. Here's the link to the configuration setting - https://chocolatey.org/docs/chocolatey-configuration#proxy (proxyBypassList). Setting it here should not break other applications as they would not be using explicit Chocolatey settings.

@johlandabee
Copy link

@ferventcoder That works. Thanks. Seems like the choco config weights more than the environment variable after all.

I've set the following:

choco config set --name proxyBypassList --value ".*\.tld,.*\.company.com"

@tremblaysimon
Copy link

It's a bit of pain that chocolatey doesn't properly use no_proxy environment variable and that we need a custom "no_proxy" setting for chocolatey...

@hitesh2494
Copy link

@ferventcoder That works. Thanks. Seems like the choco config weights more than the environment variable after all.

I've set the following:

choco config set --name proxyBypassList --value ".*\.tld,.*\.company.com"

@johlandabee this works for me as well.

@zhililab
Copy link

@ferventcoder That works. Thanks. Seems like the choco config weights more than the environment variable after all.
I've set the following:

choco config set --name proxyBypassList --value ".*\.tld,.*\.company.com"

@johlandabee this works for me as well.

thxs, it solved my problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants