|
|
@ -741,7 +741,7 @@ bool CBaseServer::ProcessConnectionlessPacket(netpacket_t * packet) |
|
|
|
// break;
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
if ( authProtocol == PROTOCOL_STEAM ) |
|
|
|
/* if ( authProtocol == PROTOCOL_STEAM )
|
|
|
|
{ |
|
|
|
{ |
|
|
|
int keyLen = msg.ReadShort(); |
|
|
|
int keyLen = msg.ReadShort(); |
|
|
|
if ( keyLen < 0 || keyLen > sizeof(cdkey) ) |
|
|
|
if ( keyLen < 0 || keyLen > sizeof(cdkey) ) |
|
|
@ -753,7 +753,7 @@ bool CBaseServer::ProcessConnectionlessPacket(netpacket_t * packet) |
|
|
|
|
|
|
|
|
|
|
|
ConnectClient( packet->from, protocol, challengeNr, clientChallenge, authProtocol, name, password, cdkey, keyLen ); // cd key is actually a raw encrypted key
|
|
|
|
ConnectClient( packet->from, protocol, challengeNr, clientChallenge, authProtocol, name, password, cdkey, keyLen ); // cd key is actually a raw encrypted key
|
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else*/ |
|
|
|
{ |
|
|
|
{ |
|
|
|
msg.ReadString( cdkey, sizeof(cdkey) ); |
|
|
|
msg.ReadString( cdkey, sizeof(cdkey) ); |
|
|
|
ConnectClient( packet->from, protocol, challengeNr, clientChallenge, authProtocol, name, password, cdkey, strlen(cdkey) ); |
|
|
|
ConnectClient( packet->from, protocol, challengeNr, clientChallenge, authProtocol, name, password, cdkey, strlen(cdkey) ); |
|
|
@ -1434,11 +1434,13 @@ bool CBaseServer::CheckChallengeType( CBaseClient * client, int nNewUserID, neta |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
if ( ( nAuthProtocol == PROTOCOL_HASHEDCDKEY ) && (Q_strlen( pchLogonCookie ) <= 0 || Q_strlen(pchLogonCookie) != 32 ) ) |
|
|
|
if ( ( nAuthProtocol == PROTOCOL_HASHEDCDKEY ) && (Q_strlen( pchLogonCookie ) <= 0 || Q_strlen(pchLogonCookie) != 32 ) ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectInvalidCertLen" ); |
|
|
|
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectInvalidCertLen" ); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
Assert( !IsReplay() ); |
|
|
|
Assert( !IsReplay() ); |
|
|
|
|
|
|
|
|
|
|
@ -1470,23 +1472,24 @@ bool CBaseServer::CheckChallengeType( CBaseClient * client, int nNewUserID, neta |
|
|
|
client->SetSteamID( CSteamID() ); // set an invalid SteamID
|
|
|
|
client->SetSteamID( CSteamID() ); // set an invalid SteamID
|
|
|
|
|
|
|
|
|
|
|
|
// Convert raw certificate back into data
|
|
|
|
// Convert raw certificate back into data
|
|
|
|
if ( cbCookie <= 0 || cbCookie >= STEAM_KEYSIZE ) |
|
|
|
/* if ( cbCookie <= 0 || cbCookie >= STEAM_KEYSIZE )
|
|
|
|
{ |
|
|
|
{ |
|
|
|
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectInvalidSteamCertLen" ); |
|
|
|
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectInvalidSteamCertLen" ); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
}*/ |
|
|
|
netadr_t checkAdr = adr; |
|
|
|
netadr_t checkAdr = adr; |
|
|
|
if ( adr.GetType() == NA_LOOPBACK || adr.IsLocalhost() ) |
|
|
|
if ( adr.GetType() == NA_LOOPBACK || adr.IsLocalhost() ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
checkAdr.SetIP( net_local_adr.GetIPHostByteOrder() ); |
|
|
|
checkAdr.SetIP( net_local_adr.GetIPHostByteOrder() ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#if 0 |
|
|
|
if ( !Steam3Server().NotifyClientConnect( client, nNewUserID, checkAdr, pchLogonCookie, cbCookie ) |
|
|
|
if ( !Steam3Server().NotifyClientConnect( client, nNewUserID, checkAdr, pchLogonCookie, cbCookie ) |
|
|
|
&& !Steam3Server().BLanOnly() ) // the userID isn't alloc'd yet so we need to fill it in manually
|
|
|
|
&& !Steam3Server().BLanOnly() ) // the userID isn't alloc'd yet so we need to fill it in manually
|
|
|
|
{ |
|
|
|
{ |
|
|
|
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectSteam" ); |
|
|
|
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectSteam" ); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Any rejections below this must call SendUserDisconnect
|
|
|
|
// Any rejections below this must call SendUserDisconnect
|
|
|
|