Skip to content

Commit

Permalink
Verify presence of value for pubkey_ed25519 in handle_pin()
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-tucci committed Dec 12, 2023
1 parent a0f7cdc commit cd6d5a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rpc/core_rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3259,8 +3259,8 @@ namespace cryptonote { namespace rpc {
if (cur_version < required) {
res.status = fmt::format("Outdated {}. Current: {}.{}.{}, Required: {}.{}.{}",name, cur_version[0], cur_version[1], cur_version[2], required[0], required[1], required[2]);
MERROR(res.status);
} else if (!pubkey_ed25519.empty() // TODO: once belnet & ss are always sending this we can remove this empty bypass
&& pubkey_ed25519 != our_pubkey_ed25519) {
} else if (!pubkey_ed25519.empty() && !(pubkey_ed25519.find_first_not_of('0') == std::string_view::npos) // TODO: once belnet & ss are always sending this we can remove this empty bypass
&& (pubkey_ed25519 != our_pubkey_ed25519)) {
res.status = fmt::format("Invalid {} pubkey: expected {}, received {}", name, our_pubkey_ed25519, pubkey_ed25519);
MERROR(res.status);
} else {
Expand Down

0 comments on commit cd6d5a2

Please sign in to comment.