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

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

XMLWordPrintable

    • b12
    • x86_64
    • windows_7

      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);

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

              Created:
              Updated:
              Resolved: