mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 00:34:01 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user