Browse Source

don't check TRANSIENT destination

pull/1313/head
orignal 6 years ago
parent
commit
9e9236badb
  1. 17
      libi2pd_client/SAM.cpp

17
libi2pd_client/SAM.cpp

@ -367,13 +367,16 @@ namespace client @@ -367,13 +367,16 @@ namespace client
return;
}
//ensure it's a base64 string
i2p::data::PrivateKeys keys;
if (!keys.FromBase64(destination))
{
SendMessageReply(SAM_SESSION_STATUS_INVALID_KEY, strlen(SAM_SESSION_STATUS_INVALID_KEY), true);
return;
}
if (destination != SAM_VALUE_TRANSIENT)
{
//ensure it's a base64 string
i2p::data::PrivateKeys keys;
if (!keys.FromBase64(destination))
{
SendMessageReply(SAM_SESSION_STATUS_INVALID_KEY, strlen(SAM_SESSION_STATUS_INVALID_KEY), true);
return;
}
}
// create destination
auto session = m_Owner.CreateSession (id, destination == SAM_VALUE_TRANSIENT ? "" : destination, &params);

Loading…
Cancel
Save