aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tkachev2016-08-01 16:03:42 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitdc02a789b6b2fc4e7693b2e7e69ff57b2767b889 (patch)
treec983a21e18c6d784d9c3d16250dcc1306cec08d9
parent8a1cca896eedd37e3926cc036fc00e659719e613 (diff)
downloadscummvm-rg350-dc02a789b6b2fc4e7693b2e7e69ff57b2767b889.tar.gz
scummvm-rg350-dc02a789b6b2fc4e7693b2e7e69ff57b2767b889.tar.bz2
scummvm-rg350-dc02a789b6b2fc4e7693b2e7e69ff57b2767b889.zip
CLOUD: Use forbidden combinations
I accidentally tried "folder../" instead "folder/../" and understood that I made "folder../" forbidden too, though it's a valid folder name.
-rw-r--r--backends/networking/sdl_net/handlerutils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/networking/sdl_net/handlerutils.cpp b/backends/networking/sdl_net/handlerutils.cpp
index f0c62d330a..dc21ab5ce1 100644
--- a/backends/networking/sdl_net/handlerutils.cpp
+++ b/backends/networking/sdl_net/handlerutils.cpp
@@ -125,7 +125,7 @@ Common::String HandlerUtils::normalizePath(const Common::String &path) {
}
bool HandlerUtils::hasForbiddenCombinations(const Common::String &path) {
- return (path.contains("../") || path.contains("..\\"));
+ return (path.contains("/../") || path.contains("\\..\\") || path.contains("\\../") || path.contains("/..\\"));
}
bool HandlerUtils::isBlacklisted(const Common::String &path) {