mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 04:46:38 +01:00
correct parsing of addreses containing #
This commit is contained in:
parent
3872c2a3f5
commit
ad9c11cd92
1 changed files with 2 additions and 2 deletions
|
@ -422,9 +422,9 @@ namespace client
|
||||||
std::string name = s.substr(0, pos++);
|
std::string name = s.substr(0, pos++);
|
||||||
std::string addr = s.substr(pos);
|
std::string addr = s.substr(pos);
|
||||||
|
|
||||||
size_t pos = s.find('#');
|
size_t pos = addr.find('#');
|
||||||
if (pos != std::string::npos)
|
if (pos != std::string::npos)
|
||||||
addr = addr.substr(pos); // remove comments
|
addr = addr.substr(0, pos); // remove comments
|
||||||
|
|
||||||
auto ident = std::make_shared<i2p::data::IdentityEx> ();
|
auto ident = std::make_shared<i2p::data::IdentityEx> ();
|
||||||
if (!ident->FromBase64(addr)) {
|
if (!ident->FromBase64(addr)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue