rest: Use SAFE_CHARS_URI in SanitizeString error msg

When dealing with URI parts, it seems more consistent to use
corresponding SAFE_CHARS_URI mode in error messages.

Co-Authored-By: stickies-v <stickies-v@protonmail.com>
This commit is contained in:
MarcoFalke
2025-05-17 09:06:42 +02:00
parent 8888bb499d
commit fab06ac037
2 changed files with 2 additions and 2 deletions

View File

@@ -964,7 +964,7 @@ static bool rest_blockhash_by_height(const std::any& context, HTTPRequest* req,
const auto blockheight{ToIntegral<int32_t>(height_str)};
if (!blockheight || *blockheight < 0) {
return RESTERR(req, HTTP_BAD_REQUEST, "Invalid height: " + SanitizeString(height_str));
return RESTERR(req, HTTP_BAD_REQUEST, "Invalid height: " + SanitizeString(height_str, SAFE_CHARS_URI));
}
CBlockIndex* pblockindex = nullptr;