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

UUID#fromString Accepts Invalid Input

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 16
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: