mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-18 11:08:08 -04:00
Make sure to validate that we have the key for the given address
This commit is contained in:
parent
6b72108681
commit
0a69eb5866
1 changed files with 4 additions and 0 deletions
|
@ -78,6 +78,10 @@ impl Transport for TorConfig {
|
|||
let onion_bytes = key.public().get_onion_address().get_raw_bytes();
|
||||
let onion_port = onion.port();
|
||||
|
||||
if onion.hash() != &onion_bytes {
|
||||
return Err(TransportError::MultiaddrNotSupported(addr));
|
||||
}
|
||||
|
||||
let localhost_tcp_random_port_addr = format!("/ip4/127.0.0.1/tcp/{}", onion_port).as_str()
|
||||
.parse()
|
||||
.expect("always a valid multiaddr");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue