Special characters in basic authentication username doesn't work with Chrome, but does work in IE and Firefox

I have a web server configured with Basic Authentication and LDAP. I can usually log in with usernames containing English alphabets for all three browsers. However, if the username contains special characters (eg German names like RÈM WÉB), the webserver returns 401 and I get authenticated again, i.e. Apache does not check.

After checking the apache access.log, I can tell that when I log in with firefox and chrome, the encoding seems to be different. Is this encoding determined by the browser or web server? I am assuming the browser is making everything work fine with firefox. Where can I set this coding scheme in chrome?

Also, to confirm that it is a browser, I see that the submitted authorization header is different for the same user in Firefox and Chrome. Obviously the header is not encoded in the same way by the browser. Any suggestions?

More debugging says firefox (as well as IE) use ISO8859-1 for encoding, while chrome uses UTF-8.

I'll be fine even if Apache webserver tries multiple times (if ISO8859-1 returns 401, it should try again with UTF-8). Either the browser or the web server solution should be fine.

+3


source to share


1 answer


Try changing the character set on the login page to use ISO8859-1



<meta charset="ISO8859-1" />

      

+1


source







All Articles