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

URLPermission with query or fragment behaves incorrectly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 12
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      It's possible to create a java.net.URLPermission (contrary to the spec) with a query and/or fragment after the path, and this affects the behavior of the implies() method such that it behaves incorrectly.

      URLPermission is specified that query and fragments are not part of the URL string passed to the constructor, but it is not specified to throw IAE.

      The simplest solution might be to strip these components when the object is constructed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michaelm Michael McMahon
                Reporter:
                michaelm Michael McMahon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: