reject url with . as file name

This commit is contained in:
orignal
2026-10-14 20:34:46 -04:00
parent a1c381588c
commit e04368fa01
+1 -1
View File
@@ -988,7 +988,7 @@ namespace torrents
LogPrint (eLogDebug, "TorrentsRPC: Tunnel not found or web is not supported ", subUrlPath->string ());
}
}
if (!isPathValid || fileSubUrl.string ().find ("..") != std::string::npos)
if (!isPathValid || fileSubUrl.string ().find ("..") != std::string::npos || fileSubUrl == ".")
{
SendResponse (boost::beast::http::status::forbidden);
return;