Steps to reproduce
Install a fresh Openfire 4.2.2 setup to a blank database
Check the values of database.defaultProvider.username, database.defaultProvider.password
Expected results
The database username and password is encrypted in both the conf/openfire.xml file and in the matching entry in the ofprivate table.
Actual results
The database username and password is encrypted in the conf/openfire.xml file, but in plain text in the ofprivate table.
Workaround
Manually encrypt the properties using the "+" button in the admin GUI.
Note; the workaround ends up with a different (encrypted) value in the database than in the openfire.xml file - the latter is left untouched by the manual encryption process, hence this step doesn't affect functionality.
Note 2; also affects ldap.adminDN, ldap.adminPassword settings.
NB. I'm surprised that the encrypted form of the database credentials differ between the conf/openfire.xml and database, but things still appear to work regardless.
Re-opened due to query @ https://github.com/igniterealtime/Openfire/pull/1060#issuecomment-401370818
I've double checked my tests, and re-closing as I now believe it's all working OK.