Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6628661
Votes 0
Synopsis NTLM-authentication doesn't work with non-ASCII letters
Category java:classes_net
Reported Against
Release Fixed 7(b25), 6u10(b09) (Bug ID:2155859)
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs
Submit Date 12-NOV-2007
Description
FULL PRODUCT VERSION :
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
 customer  Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
The NTLM-authentication in HTTPUrlConnection doesn't work if the windows password contains non-ASCII letters.
 
Reason: "NTLMAuthSequence.c" contains the function "Java_sun_net_www_protocol_http_NTLMAuthSequence_getCredentialsHandle"
that encodes the password in UTF-8 and sends it to the Windows API function "AcquireCredentialsHandleA" with the flag
"SEC_WINNT_AUTH_IDENTITY_ANSI"
And so a "ä" (ä) converts to c3 a4. But e4 is expected -> ä in ANSI




REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Password with ASCII letters
Posted Date : 2007-11-12 18:43:46.0
Work Around
N/A
Evaluation
The native implementation of getCredentialsHandle should use JNU_GetStringPlatformChars to convert the jstring to the locale specific native C string.
Posted Date : 2007-11-13 17:53:38.0
Comments
  
  Include a link with my name & email   

Submitted On 10-JAN-2008
LosBubos
The error still persists.
 
Could it be the better solution for the string to remain Unicode and use the flag SEC_WINNT_AUTH_IDENTITY_UNICODE?



PLEASE NOTE: JDK6 is formerly known as Project Mustang