Update Download.cpp

This commit is contained in:
Edo 2024-01-20 14:15:12 +01:00 committed by GitHub
parent 8ed849bf53
commit 45cfea133b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -478,14 +478,14 @@ namespace Components
if (len <= 0) if (len <= 0)
{ {
ReplyError(c, 403, "Password Required"); Download::ReplyError(c, 403, "Password Required");
return false; return false;
} }
const auto password = std::string(buffer, len); const auto password = std::string(buffer, len);
if (password != Utils::String::DumpHex(Utils::Cryptography::SHA256::Compute(g_password), "")) if (password != Utils::String::DumpHex(Utils::Cryptography::SHA256::Compute(g_password), ""))
{ {
ReplyError(c, 403, "Invalid Password"); Download::ReplyError(c, 403, "Invalid Password");
return false; return false;
} }