-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Inside this block in setOptionsFromURI():
if opts.Kerberos.Service != "" && !cs.AuthMechanismPropertiesSet { cs.AuthMechanismProperties["SERVICE_NAME"] = opts.Kerberos.Service cs.AuthMechanismPropertiesSet = true }
cs.AuthMechanismProperties is not initialized if the auth mechanism was not specified in the URI (i.e. it didn't get initialized during connstring.Parse()).
We need to do the same thing that we do for the mongodb-aws mechanism and add this to the start of the block:
if cs.AuthMechanismProperties == nil {
cs.AuthMechanismProperties = make(map[string]string)
}