fix: refine CGI path validation to exclude relative paths

This commit is contained in:
Quinten 2025-11-11 16:29:19 +01:00
parent 77e09f43ed
commit 82c421f458

View File

@ -181,7 +181,7 @@ std::string AConfig::getCGIPath(const std::string &extension) const
}
auto exts = directive->getValue().try_get<std::vector<std::string>>().value();
auto cgiPath = exts.back();
if (cgiPath.starts_with("."))
if (cgiPath.starts_with(".") && !cgiPath.starts_with("./"))
{
continue;
}