From 7d3beeb9e09a73794f2b498445d1fee22974c01c Mon Sep 17 00:00:00 2001 From: shortcutme Date: Thu, 13 Jul 2017 14:59:17 +0200 Subject: [PATCH] Enforce valid relative paths on verification --- src/Content/ContentManager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index b826ab92..6bfb7fda 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -753,6 +753,10 @@ class ContentManager(object): content_size_optional, rules["max_size_optional"]) ) + for file_relative_path in content.get("files", {}).keys() + content.get("files_optional", {}).keys(): + if not self.isValidRelativePath(file_relative_path): + raise VerifyError("Invalid relative path: %s" % file_relative_path) + # Filename limit if rules.get("files_allowed"): for file_inner_path in content["files"].keys():