mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Use std::string_view throughout util strencodings/string
This commit is contained in:
@@ -131,7 +131,7 @@ static bool RPCAuthorized(const std::string& strAuth, std::string& strAuthUserna
|
||||
return false;
|
||||
if (strAuth.substr(0, 6) != "Basic ")
|
||||
return false;
|
||||
std::string strUserPass64 = TrimString(strAuth.substr(6));
|
||||
std::string_view strUserPass64 = TrimStringView(std::string_view{strAuth}.substr(6));
|
||||
auto userpass_data = DecodeBase64(strUserPass64);
|
||||
std::string strUserPass;
|
||||
if (!userpass_data) return false;
|
||||
|
||||
Reference in New Issue
Block a user