proxy bypass hosts/domains not parsed correctly on Mac when using system proxy settings

RESOLVED FIXED

Status

()

Core
Networking
--
major
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: Constantine V. Sokolov, Assigned: Josh Aas)

Tracking

({fixed1.9.1})

1.9.1 Branch
All
Mac OS X
fixed1.9.1
Points:
---
Bug Flags:
blocking1.9.1 -
wanted1.9.1 +
in-litmus ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

8.88 KB, patch
beltzner
: approval1.9.1+
Details | Diff | Splinter Review
(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2

FF - Preferencer - Advanced - Network - Connection «Settings» - «Use system proxy settings» selected;
MacOSX - Network Preferences - AirPort «Advanced» - Proxies - FTP/HTTP/HTTPS and «Bypass proxy settings for these Hosts&Domains» typed «*.dev, *.devel»

BUT FF try connect to http://test.dev and http://mywork.devel via PROXY !!!

Safari4 is work correct with this settings.

Reproducible: Always

Steps to Reproduce:
if MacOSX System Proxy is ON and FF use System Proxy this bug is constant =(
(Reporter)

Updated

10 years ago
Version: unspecified → 3.1 Branch

Comment 1

10 years ago
Do NOT use a star, it very clearly explained in the example just below the field.

Comment 2

10 years ago
Invalid then?

Comment 3

9 years ago
I can confirm this bug. I reported it in 3.1 beta 3, and it is most definitely still in 3.5 beta 4. I am using Mac OS X 10.5.6.

In System Preferences, on the Network pane, there is a text field called "Bypass roxy settings for these Hosts & Domains". By default, this field contains "*.local, 169.254/16". The star that apparently hurts Firefox is in there by default on my Mac, so maybe Firefox should be fixed to ignore stars.

Anyhow, following the above advice about the stars, I changed that line to ".local, 169.254/16, 192.168/16" so I can connect directly to hosts on my network. I can confirm that Safari 4 beta is able to connect directly to 192.168.0.1 and to www.google.com (via proxy) as expected.

However, Firefox 3.5 beta 4 (with these settings), still engages the proxy for all connections. When I try to connect to 192.168.0.1, I see the busy animation, and when it times-out I get the error message from my ISP's proxy. This is for an address that is in the bypass field, and is correctly bypassed by Safari and not Firefox. Also, I have tried changing the field to ".local, 169.254.0.0/16, 192.168.0.0/16" to match the example in the Firefox preferences, but this doesn't work either.

Firefox might also need some sort of translation for this field too, because it's clear to me that the MacOS X syntax for proxy bypass is different to the Firefox syntax. It's not hard to change either, but it does mean that it doesn't work out-of-the-box.

I can confirm that Firefox, when configured to use the System proxy settings, does not honour the System bypass settings, on MacOS X 10.5.6.

Updated

9 years ago
Flags: blocking-firefox3.5?
Confirming based on comment 3

Josh: can you look at this? Reportedly a regression in beta 4.
Status: UNCONFIRMED → NEW
Component: Preferences → Networking
Ever confirmed: true
Flags: blocking-firefox3.5?
Keywords: regression
Product: Firefox → Core
QA Contact: preferences → networking
Version: 3.5 Branch → 1.9.1 Branch
Flags: blocking1.9.1?
Perhaps nsOSXSystemProxySettings::IsInExceptionList is broken?
(Assignee)

Comment 6

9 years ago
I can reproduce, I'll take a look.
Assignee: nobody → joshmoz
(Assignee)

Comment 7

9 years ago
Removing regression keyword, this stuff almost certainly never worked in system proxy mode. The code that is choking has been around since we added system proxy usage.

I set up a bogus proxy address and excepted "*.google.com" to test this. Safari let me access google.com, Firefox did not. This is because in Firefox (nsOSXSystemProxySettings.mm) we check the proxy exception by comparing the strings "google.com" (from Firefox networking) and "*.google.com" from the OS exception list. That comparison fails, so you can't access google.com. You can fix this by just writing "google.com" in the OS exceptions text field.

We need to make our domain comparison code smarter, probably include support for "*" and the "/" syntax.
Keywords: regression
Hardware: x86 → All
(Assignee)

Comment 8

9 years ago
I stole the Windows code and it works better, but the Windows code isn't very smart either...

If your exception is "google.com" you can't load subdomains like "www.google.com" and if your exception is "*.google.com" you can't load just "google.com". Very literal. In IE on Windows if your exception is "*.google.com" you can still load "google.com".
Not blocking since it's not a regression, but can we see the partial patch that you're working up?
Flags: wanted1.9.1+
Flags: blocking1.9.1?
Flags: blocking1.9.1-
Summary: list of «Bypass proxy hosts/domains» is not work - FF try to use «System Proxy» for ALL SITES list of «Bypass proxy hosts/domains» is not work - FF try to use «System Proxy» for ALL SITES → proxy bypass hosts/domains not parsed correctly on Mac when using system proxy settings proxy bypass hosts/domains not parsed correctly on Mac when using system proxy settings
(Assignee)

Comment 10

9 years ago
Created attachment 375948 [details] [diff] [review]
fix v0.8

This is the gist of it so far, didn't have time to finish today. This needs closer inspection, a port comparison on Mac OS X, and more testing.
(Assignee)

Comment 11

9 years ago
Created attachment 376056 [details] [diff] [review]
fix v1.0
Attachment #375948 - Attachment is obsolete: true
Attachment #376056 - Flags: superreview?(roc)
Attachment #376056 - Flags: superreview?(roc) → superreview+
(Assignee)

Comment 12

9 years ago
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/1671b6e69007
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Updated

9 years ago
Attachment #376056 - Flags: approval1.9.1?
Comment on attachment 376056 [details] [diff] [review]
fix v1.0

a191=beltzner
Attachment #376056 - Flags: approval1.9.1? → approval1.9.1+

Updated

9 years ago
Flags: in-litmus?
(Assignee)

Comment 14

9 years ago
pushed to mozilla-1.9.1

http://hg.mozilla.org/releases/mozilla-1.9.1/rev/d5a1a75a42d7
Keywords: fixed1.9.1
(Reporter)

Comment 15

9 years ago
many thanx,
but half year for this little bug..
You need to log in before you can comment on or make changes to this bug.