diff options
author | Alexander Tkachev | 2016-08-01 16:03:42 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | dc02a789b6b2fc4e7693b2e7e69ff57b2767b889 (patch) | |
tree | c983a21e18c6d784d9c3d16250dcc1306cec08d9 | |
parent | 8a1cca896eedd37e3926cc036fc00e659719e613 (diff) | |
download | scummvm-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.cpp | 2 |
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) { |