From 0eabc252b8b21de5296f840f9da67467c0699ba9 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 15 Jul 2025 12:08:27 +0200 Subject: [PATCH] Relax path_user sandbox access in mainmenu fixes #16302 --- src/script/scripting_mainmenu.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/script/scripting_mainmenu.cpp b/src/script/scripting_mainmenu.cpp index 862c3d5199..81eef7e2f3 100644 --- a/src/script/scripting_mainmenu.cpp +++ b/src/script/scripting_mainmenu.cpp @@ -84,16 +84,7 @@ bool MainMenuScripting::mayModifyPath(const std::string &path) return true; std::string path_user = fs::AbsolutePathPartial(porting::path_user); - - if (fs::PathStartsWith(path, path_user + DIR_DELIM "client")) - return true; - if (fs::PathStartsWith(path, path_user + DIR_DELIM "games")) - return true; - if (fs::PathStartsWith(path, path_user + DIR_DELIM "mods")) - return true; - if (fs::PathStartsWith(path, path_user + DIR_DELIM "textures")) - return true; - if (fs::PathStartsWith(path, path_user + DIR_DELIM "worlds")) + if (fs::PathStartsWith(path, path_user)) return true; if (fs::PathStartsWith(path, fs::AbsolutePathPartial(porting::path_cache)))