Prohibit trackers named . or ..

This commit is contained in:
Drew DeVault 2021-06-12 11:55:10 -04:00
parent dedc26ad97
commit 9f4d75f42c
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ class Tracker(Base):
valid.expect(not valid.ok or name_re.match(name),
"Only alphanumeric characters or <samp>._-</samp>",
field="name")
valid.expect(not valid.ok or name not in [".", ".."],
"Name cannot be '.' or '..'",
field="name")
valid.expect(not desc or len(desc) < 4096,
"Must be less than 4096 characters",
field="description")