diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-01 15:52:17 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-01 18:41:39 +0000 |
commit | 1c44e65863ddd4919a53a8605add96b96104e2ff (patch) | |
tree | 484093cbef1c928e793ad02c5c4ba531fc947a24 /src/wallet | |
parent | Merge pull request #5486 (diff) | |
download | monero-1c44e65863ddd4919a53a8605add96b96104e2ff.tar.xz |
wallet2: reject standalone short payment IDs in monero: URI API
Diffstat (limited to 'src/wallet')
-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 6554ef7d5..1f4652101 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -12610,8 +12610,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(); @@ -12705,8 +12704,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; |