File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
MongoDB.Driver/Communication/Security/Mechanisms Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -160,9 +160,17 @@ public byte[] BytesToSendToServer
160
160
161
161
public ISaslStep Transition ( SaslConversation conversation , byte [ ] bytesReceivedFromServer )
162
162
{
163
- if ( bytesReceivedFromServer == null || bytesReceivedFromServer . Length != 32 ) //RFC specifies this must be 4 octets
163
+ // Even though RFC says that clients should specifically check this and raise an error
164
+ // if it isn't true, this breaks on Windows XP, so we are skipping the check for windows
165
+ // XP, identified as Win32NT 5.1: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
166
+ if ( Environment . OSVersion . Platform != PlatformID . Win32NT ||
167
+ Environment . OSVersion . Version . Major != 5 ||
168
+ Environment . OSVersion . Version . Minor != 1 )
164
169
{
165
- throw new MongoSecurityException ( "Invalid server response." ) ;
170
+ if ( bytesReceivedFromServer == null || bytesReceivedFromServer . Length != 32 ) //RFC specifies this must be 4 octets
171
+ {
172
+ throw new MongoSecurityException ( "Invalid server response." ) ;
173
+ }
166
174
}
167
175
168
176
byte [ ] decryptedBytes ;
You can’t perform that action at this time.
0 commit comments