From 5b54af1728907559999e446e56497055297a3696 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Tue, 1 Sep 2026 04:38:29 -0500 Subject: [PATCH] Fix license compliance and fix things up, add reverse proxy, fix some security flaws with HttpUtils --- src/Http/HttpServer.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/Http/HttpServer.cpp b/src/Http/HttpServer.cpp index af14d88..dc98225 100644 --- a/src/Http/HttpServer.cpp +++ b/src/Http/HttpServer.cpp @@ -1004,20 +1004,6 @@ ServerContext &ServerContext::WriteHeaders() { return *this; } -static void sanitise_path(std::string &path) { - bool endsWithSlash = !path.empty() ? (path.back() == '/') : false; - Tesses::Framework::Filesystem::VFSPath path2 = path; - for (auto ittr = path2.path.begin(); ittr != path2.path.end(); ittr++) { - if (*ittr == ".." || *ittr == ".") { - path2.path.erase(ittr); - ittr--; - } - } - path = path2.ToString(); - if (endsWithSlash) - path += '/'; -} - void HttpServer::Process(std::shared_ptr strm, std::shared_ptr server, std::string ip, uint16_t port, uint16_t serverPort, bool encrypted, @@ -1061,7 +1047,6 @@ void HttpServer::Process(std::shared_ptr strm, pp.resize(2); ctx.originalPath = pp[0]; - sanitise_path(ctx.originalPath); ctx.path = ctx.originalPath; TF_LOG(ctx.method + " with path " + ctx.path);