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

BasicPermission.newPermissionCollection collection does not enforce homogeneity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.2
    • security-libs
    • None
    • beta
    • generic
    • generic

      The collection returned by BasicPermission.newPermissionCollection does not correctly enforce homogeneity of its collection. The problem is that both the add and implies methods of BasicPermissionCollection simply check for instanceof BasicPermission, instead of checking for type equality with the original subclass of BasicPermission. As such, it is possible (for example) to add a NetPermission to a collection of RuntimePermission, and (worse) the collection will incorrectly say that RuntimePermission("*") implies NetPermission("foo").

            claisunw Charlie Lai (Inactive)
            bscheiflsunw Bob Scheifler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: