mirror of
https://github.com/vtnerd/monero-lws.git
synced 2024-12-22 11:29:24 +00:00
Add equivalent check to validate admin endpoint (#131)
Some checks failed
unix-ci / build-tests (macos-12, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-12, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (macos-13, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-13, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (macos-latest, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-latest, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-20.04, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-20.04, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-22.04, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-22.04, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-latest, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-latest, WITH_RMQ=ON) (push) Has been cancelled
Some checks failed
unix-ci / build-tests (macos-12, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-12, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (macos-13, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-13, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (macos-latest, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (macos-latest, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-20.04, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-20.04, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-22.04, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-22.04, WITH_RMQ=ON) (push) Has been cancelled
unix-ci / build-tests (ubuntu-latest, WITH_RMQ=OFF) (push) Has been cancelled
unix-ci / build-tests (ubuntu-latest, WITH_RMQ=ON) (push) Has been cancelled
This commit is contained in:
parent
24e6c2f5f3
commit
64dd5d1aa9
1 changed files with 7 additions and 1 deletions
|
@ -288,8 +288,14 @@ namespace lws { namespace rpc
|
||||||
db::account_address address{};
|
db::account_address address{};
|
||||||
crypto::secret_key view_key{};
|
crypto::secret_key view_key{};
|
||||||
|
|
||||||
if (!convert_key(dest, address.spend_public, req.spend_public_hex, "spend_public_hex"))
|
if (req.spend_public_hex == req.view_public_hex)
|
||||||
|
{
|
||||||
|
output_error(dest, "spend_public_hex", "spend_public_hex and view_public_hex should not be equal");
|
||||||
return success(); // error is delivered in JSON as opposed to HTTP codes
|
return success(); // error is delivered in JSON as opposed to HTTP codes
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!convert_key(dest, address.spend_public, req.spend_public_hex, "spend_public_hex"))
|
||||||
|
return success();
|
||||||
if (!convert_key(dest, address.view_public, req.view_public_hex, "view_public_hex"))
|
if (!convert_key(dest, address.view_public, req.view_public_hex, "view_public_hex"))
|
||||||
return success();
|
return success();
|
||||||
if (!convert_key(dest, unwrap(unwrap(view_key)), req.view_key_hex, "view_key_hex"))
|
if (!convert_key(dest, unwrap(unwrap(view_key)), req.view_key_hex, "view_key_hex"))
|
||||||
|
|
Loading…
Reference in a new issue