[dak/master] Add regexp for safe filenames, including slashes.
---
daklib/regexes.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/daklib/regexes.py b/daklib/regexes.py
index 6e00164..86ca6a9 100644
--- a/daklib/regexes.py
+++ b/daklib/regexes.py
@@ -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.~+-]+?)'
--
2.1.4
Reply to: