From 9df7ed5be879a0f1d4db7fc16d3246f4574d3689 Mon Sep 17 00:00:00 2001 From: dreamer Date: Mon, 30 Mar 2026 12:36:02 +0200 Subject: [PATCH] escape more paths --- code/handlers/roothandler.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/handlers/roothandler.lua b/code/handlers/roothandler.lua index da32989..4702397 100644 --- a/code/handlers/roothandler.lua +++ b/code/handlers/roothandler.lua @@ -1,5 +1,6 @@ local to_json = require("lapis.util").to_json local autoload = require("lapis.util").autoload +local escape = require("lapis.util").escape local config = require("lapis.config") local hotmixes = autoload("hotmixes") @@ -10,8 +11,8 @@ local function Roothandler(self) local latest_path, latest_name = hotmixes.utils.these_latest( path ) self.total = hotmixes.utils.total_files_dir( path ) - self.uri = hotmixes.utils.request_path - self.path = '/data/' .. self.titles.url .. hotmixes.utils.request_path + self.uri = escape(hotmixes.utils.request_path) + self.path = escape('/data/' .. self.titles.url .. hotmixes.utils.request_path) self.dirs = stuff.dirs self.files = stuff.files self.images = stuff.images