Rev480, Skip non-ascii files at signing, Fix gevent 1.1alpha compatibility
This commit is contained in:
parent
a8dae8dd85
commit
b961a3fb0a
8 changed files with 22 additions and 18 deletions
|
@ -259,6 +259,9 @@ class ContentManager(object):
|
|||
def hashFiles(self, dir_inner_path, ignore_pattern=None, optional_pattern=None):
|
||||
files_node = {}
|
||||
files_optional_node = {}
|
||||
if not re.match("^[a-zA-Z0-9_\.\+-/]*$", dir_inner_path):
|
||||
ignored = True
|
||||
self.log.error("- [ERROR] Only ascii encoded directories allowed: %s" % dir_inner_path)
|
||||
|
||||
for file_relative_path in self.site.storage.list(dir_inner_path):
|
||||
file_name = helper.getFilename(file_relative_path)
|
||||
|
@ -270,6 +273,9 @@ class ContentManager(object):
|
|||
ignored = True
|
||||
elif file_name.startswith("."):
|
||||
ignored = True
|
||||
elif not re.match("^[a-zA-Z0-9_\.\+\-/]+$", file_relative_path):
|
||||
ignored = True
|
||||
self.log.error("- [ERROR] Only ascii encodes filenames allowed: %s" % file_relative_path)
|
||||
elif optional_pattern and re.match(optional_pattern, file_relative_path):
|
||||
optional = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue