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).
This commit is contained in:
parent
dd9e5a95dc
commit
acfa1d1f10
9 changed files with 132 additions and 19 deletions
|
@ -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 = "");
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue