diff options
author | Alexander Tkachev | 2016-08-01 14:55:58 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | acfa1d1f1069e4a4bbed8599d0e6b4e9b2ea37fe (patch) | |
tree | e9d57e3797ac334df20794c10bfec2a049e974b0 /backends/networking/sdl_net/handlerutils.h | |
parent | dd9e5a95dc5bbae20d3da05d638139120f3113f4 (diff) | |
download | scummvm-rg350-acfa1d1f1069e4a4bbed8599d0e6b4e9b2ea37fe.tar.gz scummvm-rg350-acfa1d1f1069e4a4bbed8599d0e6b4e9b2ea37fe.tar.bz2 scummvm-rg350-acfa1d1f1069e4a4bbed8599d0e6b4e9b2ea37fe.zip |
CLOUD: Handle paths in marked places
Paths containing '../' are forbidden to use in Files Manager. There is
also a special inner black list of paths which are not used and a check
that specified path is under "savepath" or "rootpath" (from "cloud"
domain).
Diffstat (limited to 'backends/networking/sdl_net/handlerutils.h')
-rw-r--r-- | backends/networking/sdl_net/handlerutils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/networking/sdl_net/handlerutils.h b/backends/networking/sdl_net/handlerutils.h index c6722688e8..4c2eff49b6 100644 --- a/backends/networking/sdl_net/handlerutils.h +++ b/backends/networking/sdl_net/handlerutils.h @@ -35,6 +35,12 @@ public: static Common::SeekableReadStream *getArchiveFile(Common::String name); static Common::String readEverythingFromStream(Common::SeekableReadStream *const stream); + static Common::String normalizePath(const Common::String &path); + static bool hasForbiddenCombinations(const Common::String &path); + static bool isBlacklisted(const Common::String &path); + static bool hasPermittedPrefix(const Common::String &path); + static bool permittedPath(const Common::String path); + static void setMessageHandler(Client &client, Common::String message, Common::String redirectTo = ""); static void setFilesManagerErrorMessageHandler(Client &client, Common::String message, Common::String redirectTo = ""); }; |