Skip to content

Commit

Permalink
don't check TRANSIENT destination
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Mar 4, 2019
1 parent 560ebce commit 9e9236b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions libi2pd_client/SAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9e9236b

Please sign in to comment.