aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/sdl_net/handlers/filespagehandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/networking/sdl_net/handlers/filespagehandler.cpp')
-rw-r--r--backends/networking/sdl_net/handlers/filespagehandler.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/backends/networking/sdl_net/handlers/filespagehandler.cpp b/backends/networking/sdl_net/handlers/filespagehandler.cpp
index 56b0551ed7..0bc9237805 100644
--- a/backends/networking/sdl_net/handlers/filespagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filespagehandler.cpp
@@ -81,17 +81,19 @@ bool FilesPageHandler::listDirectory(Common::String path, Common::String &conten
return true;
}
+ if (HandlerUtils::hasForbiddenCombinations(path))
+ return false;
+
Common::String prefixToRemove = "", prefixToAdd = "";
if (!transformPath(path, prefixToRemove, prefixToAdd))
return false;
- // TODO: handle <path>
-
Common::FSNode node = Common::FSNode(path);
if (path == "/")
node = node.getParent(); // absolute root
- // TODO: handle <path>
+ if (!HandlerUtils::permittedPath(node.getPath()))
+ return false;
if (!node.isDirectory())
return false;