mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 13:27:08 +00:00
protect against tom beech
This commit is contained in:
@@ -239,6 +239,9 @@ class SvxForm(forms.Form):
|
|||||||
# this is a new survex file being created from the template
|
# this is a new survex file being created from the template
|
||||||
if not fname.parent.is_dir():
|
if not fname.parent.is_dir():
|
||||||
fname.parent.mkdir(parents=True, exist_ok=True)
|
fname.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
if " " in self.data["filename"]:
|
||||||
|
errmsg = "Error: Spaces are not possible in filenames.\n\nRename the file."
|
||||||
|
return errmsg
|
||||||
if re.search(r"\[|\]", rcode):
|
if re.search(r"\[|\]", rcode):
|
||||||
errmsg = "Error: remove all []s from the text.\nEverything inside [] are only template guidance.\n\n"
|
errmsg = "Error: remove all []s from the text.\nEverything inside [] are only template guidance.\n\n"
|
||||||
errmsg += "All [] must be edited out and replaced with real data before you can save this file.\n"
|
errmsg += "All [] must be edited out and replaced with real data before you can save this file.\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user