mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
don't allow STREAM CONNECT and STREAM ACCEPT in command session
This commit is contained in:
parent
d02a0c9b3a
commit
5d256e1d80
@ -472,6 +472,11 @@ namespace client
|
|||||||
void SAMSocket::ProcessStreamConnect (char * buf, size_t len, size_t rem)
|
void SAMSocket::ProcessStreamConnect (char * buf, size_t len, size_t rem)
|
||||||
{
|
{
|
||||||
LogPrint (eLogDebug, "SAM: stream connect: ", buf);
|
LogPrint (eLogDebug, "SAM: stream connect: ", buf);
|
||||||
|
if ( m_SocketType != eSAMSocketTypeUnknown)
|
||||||
|
{
|
||||||
|
SendI2PError ("Socket already in use");
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::map<std::string, std::string> params;
|
std::map<std::string, std::string> params;
|
||||||
ExtractParams (buf, params);
|
ExtractParams (buf, params);
|
||||||
std::string& id = params[SAM_PARAM_ID];
|
std::string& id = params[SAM_PARAM_ID];
|
||||||
@ -547,6 +552,11 @@ namespace client
|
|||||||
void SAMSocket::ProcessStreamAccept (char * buf, size_t len)
|
void SAMSocket::ProcessStreamAccept (char * buf, size_t len)
|
||||||
{
|
{
|
||||||
LogPrint (eLogDebug, "SAM: stream accept: ", buf);
|
LogPrint (eLogDebug, "SAM: stream accept: ", buf);
|
||||||
|
if ( m_SocketType != eSAMSocketTypeUnknown)
|
||||||
|
{
|
||||||
|
SendI2PError ("Socket already in use");
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::map<std::string, std::string> params;
|
std::map<std::string, std::string> params;
|
||||||
ExtractParams (buf, params);
|
ExtractParams (buf, params);
|
||||||
std::string& id = params[SAM_PARAM_ID];
|
std::string& id = params[SAM_PARAM_ID];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user