Changed invalid URL detection to support default image URLs

This commit is contained in:
tastytea 2018-11-26 05:06:27 +01:00
parent 831b3c4ac0
commit 4da9a2144e
Signed by untrusted user: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ using namespace http;
const Request http::parse_request(const string &request)
{
if (request.substr(0, 8) != "/avatar/" ||
request.find('/', 8) != std::string::npos)
request.find("..", 8) != std::string::npos)
{
cout << "Status: 404 Not Found\n\n";
cerr << "Error: Invalid URL.\n";