openmicroscopy/openmicroscopy — pull request #3060 by mtbc (2014-09-24 15:09:48+00:00)
Title: Upgrade password encoding

Adjusts `ConfigurablePasswordProvider` so that a user logging in with a password that checks okay encoding with `ISO-8859-1` but not `UTF-8` gets it upgraded to the latter.

To test: In 5.0.4 set a user password that uses some simple accented characters, then upgrade to a 5.0 merge build and observe that only the first time that user logs in, the password hash of their password changes in the database (you may want to first note what it was so that you can easily restore the 5.0.4 state of things) and `Blitz-0.log` reports the password upgrade. Of course, on subsequent logins the user's previous password should continue to work and no further excitement should be logged.

Also try to think of any code paths reaching `ConfigurablePasswordProvider.comparePasswords` and ensure that this upgrade attempt doesn't fail in some awful spectacular way in any of them.