Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023526

Proxy Auto-Config adds IE-specific elements (ActiveXObject) in Linux/Firefox

XMLWordPrintable

    • linux

      FULL PRODUCT VERSION :
      Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Debian 6.0.7, both i686 and x86_64
      2.6.32-5-amd64
      2.6.32-5-686-bigmem

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Happens both with browser plug-in and Java web start, seems to be related to deploy.jar

      A DESCRIPTION OF THE PROBLEM :
      When using PAC (proxy auto-conf) with Linux/Firefox and both Java plug-in and web start the function isInNet() does not work correctly.

      The PAC parser in Java crashes with "javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "ActiveXObject" is not defined. (<Unknown source>#48) in <Unknown source> at line number 48" and instead of the correct proxy "DIRECT" is chosen.

      It seems that in com.sun.deploy.net.proxy jsDnsResolveForIE is chosen in our environment, and the not working ActiveXObject jsDnsResolveActiveXObj is included in the autoProxyScript.

      As soon as the PAC uses functions the bug is triggered.

      Working (but not usable for our environement):
      ------------
      function FindProxyForURL(url, host) {
        return "PROXY auproxy1.syscomp.de:3128";
      }

      Shortest example for a crashing PAC I found:
      ------------
      function FindProxyForURL(url, host) {
        if (isInNet(host, "10.0.0.0", "255.0.0.0")) {
          return "DIRECT";
        return "PROXY auproxy1.syscomp.de:3128";
      }

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      * Configure a proxy auto-config URL (using functions) in control panel
      * Start a Java applet or web start application


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      => PAC is interpreted and the return value used as proxy
      ACTUAL -
      => PAC is not interpreted but PROXY=DIRECT used

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "ActiveXObject" is not defined. (<Unknown source>#48) in <Unknown source> at line number 48
      at com.sun.script.javascript.RhinoScriptEngine.invoke(RhinoScriptEngine.java:300)
      at com.sun.script.javascript.RhinoScriptEngine.invokeFunction(RhinoScriptEngine.java:258)
      at com.sun.deploy.net.proxy.SunAutoProxyHandler.getProxyInfo(Unknown Source)
      at com.sun.deploy.net.proxy.DynamicProxyManager.getProxyList(Unknown Source)
      at com.sun.deploy.net.proxy.DeployProxySelector.select(Unknown Source)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
      at java.net.Socket.connect(Socket.java:579)
      at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
      at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
      at sun.net.www.protocol.https.HttpsClient.&lt;init&gt;(HttpsClient.java:270)
      at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:327)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
      at java.net.URL.openStream(URL.java:1037)
      at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:827)
      at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:283)
      at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:140)
      at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120)
      at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:257)
      at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:220)
      at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:168)
      at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:96)
      at javax.xml.ws.Service.<init>(Service.java:77)
      at com.sonichealthcare.starnet.print.filetransfer.FileTransferWSService.<init>(FileTransferWSService.java:34)
      at com.sonichealthcare.starnet.print.util.PrintServiceUtils.getFileTransferService(PrintServiceUtils.java:264)
      at com.sonichealthcare.starnet.print.service.impl.BarcodePrintService.main(BarcodePrintService.java:46)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.sun.javaws.Launcher.executeApplication(Unknown Source)
      at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
      at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "ActiveXObject" is not defined. (<Unknown source>#48)
      at sun.org.mozilla.javascript.internal.ScriptRuntime.constructError(ScriptRuntime.java:3771)
      at sun.org.mozilla.javascript.internal.ScriptRuntime.constructError(ScriptRuntime.java:3749)
      at sun.org.mozilla.javascript.internal.ScriptRuntime.notFoundError(ScriptRuntime.java:3834)
      at sun.org.mozilla.javascript.internal.ScriptRuntime.name(ScriptRuntime.java:1761)
      at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Interpreter.java:1785)
      at sun.org.mozilla.javascript.internal.Interpreter.interpret(Interpreter.java:849)
      at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:162)
      at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(ContextFactory.java:433)
      at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(RhinoScriptEngine.java:116)
      at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(RhinoScriptEngine.java:109)
      at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
      at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:160)
      at com.sun.script.javascript.RhinoScriptEngine.invoke(RhinoScriptEngine.java:294)
      ... 40 more
      network: Verbindung von socket://austarnetsupport.syscomp.de:8443 mit Proxy=DIRECT wird hergestellt

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Don't use PAC scripts but manual proxy configuration (not feasible in complex networks)

            dtitov Daniil Titov (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: