Ticket #1874 (closed defect: fixed)
Opened 2013-05-15T17:51:51-05:00
Last modified 2013-05-31T16:13:19-05:00
WebDAV uploader: Make sure that umlauts in passwords are handled properly
Reported by: | dscho | Owned by: | dscho |
---|---|---|---|
Priority: | major | Milestone: |
|
Component: | Updater | Version: | |
Severity: | minor | Keywords: | |
Cc: | adrian.daerr@…, curtis | Blocked By: | |
Blocking: | #1901 |
Description
Adrian Daerr reported that a password with an umlaut does not get recognized properly.
I suspect that the issue is that there might be different encodings used on the Fiji Wiki side (or even the browser's side) than on the WebDAV (Java) side.
I addressed the client part of this in 4d8c9fdbf5c9e7961864e373d89c85734585787a and 37ff1a1f98c85dc30fd3b56c5f8d537e6a448440 (one commit is about working around Java's internal treating char arrays as if the encoding was hard-coded to ISO-8859-1 while we really require UTF-8 instead, the other commit is about encoding the String explicitly as UTF-8 -- on MacOSX, Java's default encoding is *still* MacRoman).
The server part took a little more effort to research (the fixes were easy enough). To force the browsers to use UTF-8, the <form> tag *must* have an accept-encoding="UTF-8" attribute. To force PHP to pass the parameters as UTF-8 (rather than ASCII, stripping out all bytes whose most significant bit is set without warning) to externally executed programs, I had to call setlocale(LC_ALL, "UTF-8") and putenv("LC_ALL", "UTF-8").
It works fine in my tests, so I uploaded it to the ImageJ update site. Would be nice if you could test the functionality on your side!