Fix license compliance and fix things up, add reverse proxy, fix some security flaws with HttpUtils
All checks were successful
Build and Deploy on Tag / 🔨 Build for PowerPC (push) Successful in 2m22s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm:latest, arm-linux-gnueabihf, arm7) (push) Successful in 2m50s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm64:latest, aarch64-linux-gnu, arm64) (push) Successful in 3m3s
Build and Deploy on Tag / 🔨 Build win32 and update the tap 🍺 (push) Successful in 4m39s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-riscv64:latest, riscv64-linux-gnu, riscv64) (push) Successful in 2m33s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x64:latest, x86_64-linux-gnu, amd64) (push) Successful in 2m20s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x86:latest, i386-linux-gnu, 386) (push) Successful in 2m15s

This commit is contained in:
2026-09-01 04:38:29 -05:00
parent 1223bf35c2
commit 5b54af1728

View File

@@ -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<Stream> strm,
std::shared_ptr<IHttpServer> server, std::string ip,
uint16_t port, uint16_t serverPort, bool encrypted,
@@ -1061,7 +1047,6 @@ void HttpServer::Process(std::shared_ptr<Stream> strm,
pp.resize(2);
ctx.originalPath = pp[0];
sanitise_path(ctx.originalPath);
ctx.path = ctx.originalPath;
TF_LOG(ctx.method + " with path " + ctx.path);