Merge pull request #38 from radicallyopensecurity/normalize-filename

Filter backtick from filename, closes #37
This commit is contained in:
Peter Mosmans
2017-07-03 20:45:27 +10:00
committed by GitHub

View File

@@ -310,7 +310,7 @@ def valid_filename(filename):
""" """
result = '' result = ''
for char in filename.strip(): for char in filename.strip():
if char in ['*', ':', '/', '.', '\\', ' ', '[', ']', '(', ')', '\'', '\"']: if char in ['*', ':', '/', '.', '\\', ' ', '[', ']', '(', ')', '\'', '\"', '`']:
if len(char) and not result.endswith('-'): if len(char) and not result.endswith('-'):
result += '-' result += '-'
else: else: