From c6343893f413626e649d849965a39f2c518f42bb Mon Sep 17 00:00:00 2001 From: xemeds Date: Mon, 20 Jul 2020 18:55:07 +0000 Subject: [PATCH] Changed url validator to add http instead of https to the beginning of urls --- tiny0/database.db | Bin 12288 -> 12288 bytes tiny0/forms.py | 4 ++-- tiny0/routes.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tiny0/database.db b/tiny0/database.db index 5d691a88e15b5bdde46d09d0e54d07de036b4d60..28be301c47ee3cabef5dc662de53da2505c23873 100644 GIT binary patch delta 33 gcmZojXh@hKEojcbz`zW|FrYk9$C%N4W5NP`0AcV2;s5{u delta 33 gcmZojXh@hKEojKVz`zW|FrY9|$C%M@W5NP`0AUyf(*OVf diff --git a/tiny0/forms.py b/tiny0/forms.py index b3dda3f..49005a0 100644 --- a/tiny0/forms.py +++ b/tiny0/forms.py @@ -31,8 +31,8 @@ def validate_URL(form, field): # If the URL does not start with http:// and https:// if not(field.data.startswith("http://")) and not(field.data.startswith("https://")): - # Add https:// to the beginning of the URL - field.data = "https://" + field.data + # Add http:// to the beginning of the URL + field.data = "http://" + field.data class URLForm(FlaskForm): diff --git a/tiny0/routes.py b/tiny0/routes.py index c0b9f84..908162a 100644 --- a/tiny0/routes.py +++ b/tiny0/routes.py @@ -52,4 +52,4 @@ def error_404(error): @app.errorhandler(500) def error_500(error): - return render_template("error.html", error_message="500 Internal Server Error"), 500 \ No newline at end of file + return render_template("error.html", error_message="500 Internal Server Error"), 500