diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-06-20 14:44:54 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-06-20 14:44:54 -0500 |
commit | 3721298cf6fc49202efc56ecf10ea12f6a05fdf5 (patch) | |
tree | 2c36da00159e3c42a702fa08a40f0a39db4a42b8 /src/common/util.cpp | |
parent | Merge pull request #3927 (diff) | |
parent | README: mention --untrusted-daemon (diff) | |
download | monero-3721298cf6fc49202efc56ecf10ea12f6a05fdf5.tar.xz |
Merge pull request #3932
8962f00 simplewallet: add optional trusted/untrusted argument to set_daemon (moneromooo-monero)
941a608 util: consider Tor/I2P addresses to be non local (moneromooo-monero)
2b3357e README: mention --untrusted-daemon (moneromooo-monero)
Diffstat (limited to 'src/common/util.cpp')
-rw-r--r-- | src/common/util.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp index 008610117..3f330fa13 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -727,6 +727,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)) |