diff --git a/tiny0/database.db b/tiny0/database.db index 28be301..8bcab84 100644 Binary files a/tiny0/database.db and b/tiny0/database.db differ diff --git a/tiny0/forms.py b/tiny0/forms.py index 49005a0..dee4707 100644 --- a/tiny0/forms.py +++ b/tiny0/forms.py @@ -19,6 +19,11 @@ def validate_URL(form, field): # Raise a ValidationError raise ValidationError("Invalid URL") + # If the url starts with a slash after http:// or after https:// or just starts with a slash + if field.data.startswith("http:///") or field.data.startswith("https:///") or field.data.startswith("/"): + # Raise a ValidationError + raise ValidationError("Invalid URL") + # If the url ends with a dot and it is the only dot if field.data.endswith(".") and field.data.count(".") == 1: # Raise a ValidationError