rpc: Quote user supplied strings in error messages

This commit is contained in:
MarcoFalke
2021-12-13 09:52:13 +01:00
parent 767c012665
commit fa24a3df87
4 changed files with 8 additions and 8 deletions

View File

@@ -210,7 +210,7 @@ CPubKey AddrToPubKey(const FillableSigningProvider& keystore, const std::string&
}
CKeyID key = GetKeyForDestination(keystore, dest);
if (key.IsNull()) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("%s does not refer to a key", addr_in));
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("'%s' does not refer to a key", addr_in));
}
CPubKey vchPubKey;
if (!keystore.GetPubKey(key, vchPubKey)) {