You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Sam Uong (Jira)" <ji...@apache.org> on 2021/09/09 23:55:00 UTC

[jira] [Created] (NETBEANS-5994) The PAC script evaluator's dnsDomainIs function doesn't support multi-level subdomains

Sam Uong created NETBEANS-5994:
----------------------------------

             Summary: The PAC script evaluator's dnsDomainIs function doesn't support multi-level subdomains
                 Key: NETBEANS-5994
                 URL: https://issues.apache.org/jira/browse/NETBEANS-5994
             Project: NetBeans
          Issue Type: Bug
          Components: platform - Proxy
            Reporter: Sam Uong


The current PAC script evaluator has a dnsDomainIs function that returns false if the host is more than one level deep in the domain. This behavior differs from other implements like Firefox and Chrome.

Reproducing this end-to-end requires hosting a PAC script that calls something like:
{quote}{{dnsDomainIs("multilevel.subdomain.example.com", ".}}{{example}}{{.com")}}
{quote}
The OS can then be configured to use this PAC script, and NetBeans needs to make a request to a host with a deeply-nested subdomain.

It's a bit easier to isolate this in a unit test, which I've done here: [https://github.com/sam-uong/netbeans/commit/f9667d7687e164783d5000430a6fd89e1143d282]. This commit also contains a fix, which I'd like to contribute if the code owners are happy with it.

I know it seems strange to simply check whether the host string ends with the domain, which results in strange behavior like `dnsDomainIs("agoogle.com", "google.com")` returning true, but this is bug-for-bug compatible with common implementations.

If this is not desirable, I could also rework this so that it returns true for multi-level subdomains, but not any random string suffix.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists