diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-05-07 17:35:27 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-05-07 17:35:28 +0200 |
commit | 97cb1c9436ec0e9f7f1468703a51596a2b8e3833 (patch) | |
tree | 8d4fd1c6741384e34bde215a93dc24b66b428b7a /src | |
parent | Merge pull request #5505 (diff) | |
parent | wallet2: reject standalone short payment IDs in monero: URI API (diff) | |
download | monero-97cb1c9436ec0e9f7f1468703a51596a2b8e3833.tar.xz |
Merge pull request #5508
1c44e658 wallet2: reject standalone short payment IDs in monero: URI API (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index ae980ce0f..4a4abd872 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -12629,8 +12629,7 @@ std::string wallet2::make_uri(const std::string &address, const std::string &pay if (!payment_id.empty()) { crypto::hash pid32; - crypto::hash8 pid8; - if (!wallet2::parse_long_payment_id(payment_id, pid32) && !wallet2::parse_short_payment_id(payment_id, pid8)) + if (!wallet2::parse_long_payment_id(payment_id, pid32)) { error = "Invalid payment id"; return std::string(); @@ -12724,8 +12723,7 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin return false; } crypto::hash hash; - crypto::hash8 hash8; - if (!wallet2::parse_long_payment_id(kv[1], hash) && !wallet2::parse_short_payment_id(kv[1], hash8)) + if (!wallet2::parse_long_payment_id(kv[1], hash)) { error = "Invalid payment id: " + kv[1]; return false; |