[CSHARP-1861] NullReferenceException when using MONGODB-X509 with 2.4.0 driver Created: 05/Dec/16  Updated: 08/Dec/16  Resolved: 08/Dec/16

Status: Closed
Project: C# Driver
Component/s: Connectivity, Security
Affects Version/s: 2.4
Fix Version/s: 2.4.1

Type: Bug Priority: Major - P3
Reporter: Tommi Paananen Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Attachments: Text File nullrefexp-mongodb-csharp-driver.txt    
Issue Links:
Related
is related to CSHARP-1822 Username no longer required for MONGO... Closed

 Description   

NullReferenceException when using MONGODB-X509 authentication with 2.4.0 driver. This leads to TimeoutException. The same application code works with 2.3.0 driver (username is used with both driver versions). Tested with MongoDB 3.2.11 and 3.4.0.



 Comments   
Comment by Githook User [ 08/Dec/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1861: Fix NullReferenceException when using X509 authentication.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/788d933f37b54d76a0904255194796ac68c279ff

Comment by Robert Stam [ 05/Dec/16 ]

We made a recent change to X509 authentication that has a bug in it. See:

https://jira.mongodb.org/browse/CSHARP-1822

I believe the problem is on this line:

https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver.Core/Core/Authentication/MongoDBX509Authenticator.cs#L129

The problem is that while we are opening the connection the Description property is still null (it will have a value once the connection is opened).

Sorry for the problem. I don't think there is a workaround. We will fix this in 2.4.1. In the meantime please continue using 2.3.0.

Generated at Wed Feb 07 21:40:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.