Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6028

[classlib][luni] Unvalid IPv6 address is allowed in the SocketPermission

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.0M8
    • 5.0M9
    • Classlib
    • None
    • Novice

    Description

      According to the spec, the host which is allowed by the SocketPermission is specified as
      host = (hostname | IPv4address | iPv6reference) [:portrange]
      portrange = portnumber | portnumber | portnumber[portnumber]
      ipv6reference = "[" IPv6address "]"
      And the full uncompressed form of the IPv6 literal address is also allowed.

      So such as [fe80::1], [FE80:0000:0000:0000:0000:0000:0000:0001]:80, FE80:0000:0000:0000:0000:0000:0000:0001, FE80:0000:0000:0000:0000:0000:0000:0001:80 is allowed, but FE80::1::80 is not allowed. The compressed form of ipv6 without "[" and "]" is not allowed.

      We can find those bad address in the good arrays in our tests and the test pass.

      Attachments

        1. patch_SocketPermission.diff
          12 kB
          Charles Lee

        Activity

          People

            purefire Jimmy, Jing Lv
            littlee Charles Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: