PAC: dnsDomainIs() is not explicitly matching to a DNS suffix

RESOLVED WONTFIX

Status

()

Core
Networking
RESOLVED WONTFIX
14 years ago
4 years ago

People

(Reporter: benc, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
228 "function dnsDomainIs(host, domain) {\n" +
229 "    return (host.length >= domain.length &&\n" +
230 "            host.substring(host.length - domain.length) == domain);\n" +
231 "}\n" +

If domain is a string without a leading ".", then it still matches in some cases
that do not make sense.

Two cases that work:
www.mozilla.org, mozilla.org
www.mozilla.org, la.org

The first is probably not as bad as the second case.

This looks similar to several comments made about how domains are handled in "no
proxy for" (part of manual config).

The examples in the PAC documents all use "." at the front. Should we assume
people who do not put a "." meant for a "."?

If so, we could automaticaly add the missing dot before doing the string comparison.

If not, should we discard fail the comparision automatically?

I think we should modify the behavior somewhat, because of the problems w/ false
positives.

Updated

12 years ago
Assignee: darin → nobody
QA Contact: benc → networking
I have tested the reported way of work on IE 9 to 11 and actual Chrome
-> all this browsers work like firefox.

i checked also all specifications for PAC files that i could find, but there is no specific information for this case.

can we maybe close this bug, because it seems to be the normal behavior for actual browsers!!
based on compat report of comment 1, close as wontfix. Thanks stefan.weiss
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.