Permalink
Browse files

Tor/I2P addresses can be non-local

  • Loading branch information...
miltonf committed Dec 4, 2018
1 parent 712b028 commit f65391047b621e66e201a06cf7607e8a82edf8cf
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/common/util.cpp
@@ -657,6 +657,13 @@ std::string get_nix_version_display_string()

bool is_local_address(const std::string &address)
{
// always assume Tor/I2P addresses to be untrusted by default
if (boost::ends_with(address, ".onion") || boost::ends_with(address, ".i2p"))
{
MDEBUG("Address '" << address << "' is Tor/I2P, non local");
return false;
}

// extract host
epee::net_utils::http::url_content u_c;
if (!epee::net_utils::parse_url(address, u_c))

0 comments on commit f653910

Please sign in to comment.