[Download] Fix mongoose crash

This commit is contained in:
/dev/root 2017-02-14 16:49:09 +01:00
parent 488706c71d
commit 65fcc95480

View File

@ -413,6 +413,13 @@ namespace Components
{
std::string url(message->uri.p, message->uri.len);
Utils::String::Replace(url, "\\", "/");
if (url.length() < 6)
{
Download::Forbid(nc);
return;
}
url = url.substr(6);
Utils::String::Replace(url, "%20", " ");