mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/RA: Fix RA subnegotiation for clients that don't send any subnegotiation data (like telnet) by setting a 1 second time window in which the client can send their packet before the RASocket will begin actual authentication.
Closes #2471
This commit is contained in:
@@ -276,8 +276,9 @@ int RASocket::subnegotiate()
|
||||
|
||||
const size_t recv_size = message_block.space();
|
||||
|
||||
// Wait a maximum of 1000ms for negotiation packet - not all telnet clients may send it
|
||||
const ssize_t n = peer().recv(message_block.wr_ptr(),
|
||||
recv_size);
|
||||
recv_size, &ACE_Time_Value(1));
|
||||
|
||||
if (n <= 0)
|
||||
return int(n);
|
||||
@@ -331,11 +332,8 @@ int RASocket::subnegotiate()
|
||||
|
||||
int RASocket::svc(void)
|
||||
{
|
||||
if (subnegotiate() == -1)
|
||||
{
|
||||
sLog->outRemote("Subnegotiation failed!");
|
||||
return -1;
|
||||
}
|
||||
//! Subnegotiation may differ per client - do not react on it
|
||||
subnegotiate();
|
||||
|
||||
if (send("Authentication required\r\n") == -1)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user