Bug: jdbcAuthProvider.passwordType is ignored

The issue tracker said to post in the forums to report bugs, so here goes:

Looking at the file src/java/org/jivesoftware/wildfire/auth/JDBCAuthProvider.java (used for allowing authentication against custom databases), line 87:

passwordType = PasswordType.plain;

try {

PasswordType.valueOf(JiveGlobals.getXMLProperty(“jdbcAuthProvider.passwordType” , “plain”));

}

catch (IllegalArgumentException iae) {

Log.error(iae);

}

The jdbcAuthProvider.passwordType value is retrieved, converted to a PasswordType… and then discarded, meaning the default (plain) is always used. Should probably be:

passwordType = PasswordType.plain;

try {

passwordType = PasswordType.valueOf(JiveGlobals.getXMLProperty(“jdbcAuthProvider.passwordType” , “plain”));

}

catch (IllegalArgumentException iae) {

Log.error(iae);

}

Hi,

I think that’‘s not exactly right. passwordType is declared as a private field in JDBCAuthProvider class. It’‘s used in other methods in the class as well. What the call to getXMLProperty does is to look for the value in xmlproperty map for jdbcAuthProvider.passwordType. If the value is not there, then use ‘‘plain’’ as the default. That’'s what the second argument to getXMLProperty does.

Hi,

this was fixed 38 days ago. See

http://www.jivesoftware.org/fisheye/viewrep/svn-org/wildfire/trunk/src/java/org/ jivesoftware/wildfire/auth/JDBCAuthProvider.java or

http://www.jivesoftware.org/fisheye/viewrep/svn-org/wildfire/trunk/src/java/org/ jivesoftware/wildfire/auth/JDBCAuthProvider.java?r1=4645&r2=4646

Please try to get the latest nightly source build or browse the SVN before reporting a bug while I know that this is not always possible.

So if you find another bug just post it.

LG

Oh… he’'s refering to the old source, while I was looking at the new one :D. Sorry…