]> git.decadent.org.uk Git - dak.git/commitdiff
Add regexp for safe filenames, including slashes.
authorAnsgar Burchardt <ansgar@debian.org>
Tue, 11 Aug 2015 19:35:19 +0000 (21:35 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Wed, 12 Aug 2015 07:59:43 +0000 (09:59 +0200)
daklib/regexes.py

index 6e00164ce1590051d41f157d20a4e864e8204428..86ca6a9595fee41980dc618cef4321e71af7d589 100644 (file)
@@ -133,6 +133,9 @@ re_includeinpdiff = re.compile(r"(Translation-[a-zA-Z_]+\.(?:bz2|xz))")
 # Match safe filenames
 re_file_safe = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_.~+-]*$')
 
+# Match safe filenames, including slashes
+re_file_safe_slash = re.compile(r'^[a-zA-Z0-9][/a-zA-Z0-9_.~+-]*$')
+
 # Prefix of binary and source filenames
 _re_file_prefix = r'^(?P<package>[a-z0-9][a-z0-9.+-]+)_(?P<version>[A-Za-z0-9.~+-]+?)'