[ https://issues.apache.org/jira/browse/NETBEANS-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241831#comment-16241831 ]
ASF GitHub Bot commented on NETBEANS-96: ---------------------------------------- lbruun commented on issue #161: [NETBEANS-96] New PAC Script evaluation environment URL: https://github.com/apache/incubator-netbeans/pull/161#issuecomment-341973053 Unit tests fixed. - The `timeRange()` test failed because it did `assertTrue(timeRange(0, 23))`, and since you did your test at 23:17 it would fail the test. The test case was obviously wrong to begin with and has now been fixed. - The `dnsResolveEx()` test failed because it made assumptions about IPv6 being available on the test host and was in any case incorrect to begin with. All tests that use name lookup have now been changed to use the `FakeDns` class, so that tests become independent of the environment of test host. There was quite a few other tests that made such stupid assumptions. - Also, if the engine detects an attempt to break out of the sandbox it will now no longer print a stack trace. The stack trace gave the impression that the unit test using `pac-test-sandbox-breakout.js` failed but it really didn't. The stack trace provides no extra information so better to leave it out, I think. Not all log messages benefit from a stack trace. :-) Thx. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > New PAC Script evaluator > ------------------------ > > Key: NETBEANS-96 > URL: https://issues.apache.org/jira/browse/NETBEANS-96 > Project: NetBeans > Issue Type: Improvement > Reporter: lbruun > Labels: pull-request-available > > The current [PAC script|https://en.wikipedia.org/wiki/Proxy_auto-config] > evaluator (in {{core.network}}) was developed pre-Nashorn and has a few > problems: > * It simply fails with Nashorn - but not with Rhino - if the downloaded > script uses {{isInNet()}}. This was reported in [Bug > 245116|https://netbeans.org/bugzilla/show_bug.cgi?id=245116]. It fails > silently in this case and defaults to no proxy. The user will never know the > reason - not even by looking in the message log - that there was an error. > * It doesn't implement two mandatory JavaScript helper methods, > {{dnsResolve()}} and {{myIpAddress()}}. This is a known issue. This causes > many PAC scripts to silently fail. > * It doesn't implement Microsoft's IPv6-aware additions to the PAC standard. > This is a problem in MS shops because they will have designed their PAC > script to be compatible with MS IE and MS Edge (which unsurprisingly support > these functions .. as do Chrome). > * It uses a small JavaScript helper, {{nsProxyAutoConfig.js}}, which uses a > license which is not compatible with Apache. This is described in NETBEANS-4. > * Isn't executing the downloaded PAC script in a sandboxed environment. (The > PAC script should be treated as hostile because the download may have been > spoofed. Browsers indeed treat the PAC script as hostile and so should > NetBeans). > Pull Request with a new implementation is on its way. -- This message was sent by Atlassian JIRA (v6.4.14#64029)