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

UUID#fromString Accepts Invalid Input

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 16
    • core-libs
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      All of the following are parsed by UUID#fromString but are actually invalid:

      0-0-0-0-0
      +0000000-0000-0000-0000-000000000000
      00000000-+000-0000-0000-000000000000
      00000000-0000-+000-0000-000000000000
      00000000-0000-0000-+000-000000000000
      00000000-0000-0000-0000-+00000000000
      0-0-0-0-0000000000000000000000000000
      0000000000000000000000000000-0-0-0-0

      Additionally all non-Latin1 digits and leading +/- signs are accepted due to the use of Long.parseLong that
      uses Character.digit(ch, 16) to convert from characters.

            rriggs Roger Riggs
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: