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

Java Plugin's isInNet implementation should support partial octet subnets

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • deploy
    • b61
    • x86
    • windows_2000

      FULL PRODUCT VERSION :
      1.4.2_08;1.4.2_09;5.0 Update 4

      ADDITIONAL OS VERSION INFORMATION :
      Windows 2000 5.00.2195 Service Pack 4

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Internet Explorer 6.0.2800.1106CO and Firefox 1.0.6

      A DESCRIPTION OF THE PROBLEM :
      The Java Plugin's support of Proxy Automatic Configuration includes its own built in implementation of isInNet.

      This implementation handles the mask argument differently than the implementations of isInNet provided by Internet Explorer and FireFox.

      Sun's position is apparently that only values of 255 and 0 are valid for parts of the IP mask.

      This is in conflict with the observed behavior from IE and FireFox, and more importantly with the concept of subnet masking with TCP/IP in general. Subnet masking is understood to be a bitwise operation and partial octet subnets should be supported.

      Why is Sun insisting that the Java Plugin be out of step with the rest of the industry on this one?

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Configure a browser and a Java Plugin for Proxy Automatic Configuration (either directly referencing a PAC file or using the browser's settings).

      Add the following JavaScript to FindProxyForURL the Proxy Auto Config (proxy.pac) being used:

       if (isInNet("172.26.103.153", "172.16.0.0", "255.240.0.0")) {
          alert("isInNet returned TRUE");
       } else {
          alert("isInNet returned FALSE");
       }

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      TRUE should *always* be returned - whether the FindProxyForURL function is being called from a browser or the Java Plugin runtime.
      ACTUAL -
      Internet Explorer: TRUE
      Firefox: TRUE
      Java Plugin Runtime: FALSE

      REPRODUCIBILITY :
      This bug can be reproduced always.

            jchusunw Jacky Chu (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: