Skip to content

Commit e4670ba

Browse files
committed
CSHARP-1310: removed RFC check in SSPI integration due to invalid implementations from KDCs.
1 parent 51f2ae4 commit e4670ba

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/MongoDB.Driver.Core/Core/Authentication/GssapiAuthenticator.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public ISaslStep Transition(SaslConversation conversation, byte[] bytesReceivedF
316316
}
317317
catch (Win32Exception ex)
318318
{
319-
throw new MongoAuthenticationException(conversation.ConnectionId, "Unable to initialize security context", ex);
319+
throw new MongoAuthenticationException(conversation.ConnectionId, "Unable to initialize security context", ex);
320320
}
321321

322322
if (!_context.IsInitialized)
@@ -353,18 +353,6 @@ public bool IsComplete
353353

354354
public ISaslStep Transition(SaslConversation conversation, byte[] bytesReceivedFromServer)
355355
{
356-
// Even though RFC says that clients should specifically check this and raise an error
357-
// if it isn't true, this breaks on Windows XP, so we are skipping the check for windows
358-
// XP, identified as Win32NT 5.1: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
359-
if (Environment.OSVersion.Platform != PlatformID.Win32NT ||
360-
Environment.OSVersion.Version.Major != 5)
361-
{
362-
if (bytesReceivedFromServer == null || bytesReceivedFromServer.Length != 32) //RFC specifies this must be 4 octets
363-
{
364-
throw new MongoAuthenticationException(conversation.ConnectionId, message: "Invalid server response.");
365-
}
366-
}
367-
368356
byte[] decryptedBytes;
369357
try
370358
{

0 commit comments

Comments
 (0)