Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
2.11.3
-
None
Description
The implementation inside the DBPort.SaslAuthenticator.authenticate() method is making some class casting assuming that a given field (e.g. res.get("payload") ) is an instance of the expected class ( e.g. byte[] ). However, when custom BSON decoder is used for example returns org.bson.types.Binary instances instead of byte[] ones, these assumptions made inside the SaslAuthenticator.authenticate() are wrong and a ClassCastException will occur.
Given these assumptions made inside the authenticate() method, it is necessary to change the sendSaslStart() call so that it uses the standard DefaultDBDecoder and not the user chosen one (which is set using a DBDecoderFactory).