mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
[addressbook] check domain ending when processing subscriptions
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
d2faec70be
commit
3dd9e81296
1 changed files with 14 additions and 0 deletions
|
@ -470,6 +470,20 @@ namespace client
|
||||||
if (pos != std::string::npos)
|
if (pos != std::string::npos)
|
||||||
addr = addr.substr(0, pos); // remove comments
|
addr = addr.substr(0, pos); // remove comments
|
||||||
|
|
||||||
|
pos = name.find(".b32.i2p");
|
||||||
|
if (pos != std::string::npos)
|
||||||
|
{
|
||||||
|
LogPrint (eLogError, "Addressbook: skipped adding of b32 address: ", name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pos = name.find(".i2p");
|
||||||
|
if (pos == std::string::npos)
|
||||||
|
{
|
||||||
|
LogPrint (eLogError, "Addressbook: malformed domain: ", name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
auto ident = std::make_shared<i2p::data::IdentityEx> ();
|
auto ident = std::make_shared<i2p::data::IdentityEx> ();
|
||||||
if (!ident->FromBase64(addr)) {
|
if (!ident->FromBase64(addr)) {
|
||||||
LogPrint (eLogError, "Addressbook: malformed address ", addr, " for ", name);
|
LogPrint (eLogError, "Addressbook: malformed address ", addr, " for ", name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue