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

Add support for UTF-8 encoded credentials in HTTP Basic Authentication

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b12
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_161"
      Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
      Java HotSpot(TM) Client VM (build 25.161-b12, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Sürüm 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      While using BasicAuthenticator, turkish characters are correctly handled.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      include turkish character as user and/or password like "şŞİıöÖğĞüÜçÇ"

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      user and password provided should correctly authanticate.
      ACTUAL -
      the string is converted as they are single byte encoded characters.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      created local version of class BasicAıthenticator.java

      in class BasicAuthenticatior line 76, changed the line
      from
             String userpass = new String (b);

      to
             String userandpass = UTF8String.getValue(b);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michaelm Michael McMahon
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: