No Proxy For: fix comparisons so ".domain.com" blocks "domain.com"

VERIFIED DUPLICATE of bug 280280

Status

()

VERIFIED DUPLICATE of bug 280280
14 years ago
14 years ago

People

(Reporter: benc, Assigned: darin.moz)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
const char *host_tail = host.get() + host_len - filter_host_len;
                 if (!PL_strncasecmp(host_tail, hinfo->name.host, filter_host_len))
                     return PR_FALSE; // proxy disallowed


No proxy uses a suffix string compare to decide if a URL should be blocked. The
no proxy for convention is that ".domain.com" (we also accept a leading "*", so
"*.domain.com" to some) would block www.domain.com, ftp.domain.com, etc.

This does not match "domain.com". To block everything in a domain, you have to
enter: "domain.com, .domain.com".

The solution seems rather simple, we should literalize the URL hostname by
adding a leading "." if one is not present, then do the comparison.
Compare bug 280280.

*** This bug has been marked as a duplicate of 280280 ***
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 3

14 years ago
V/dupe.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.