From 58624e152e603de136f6a077ebc1028d33eceed4 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 19 Jul 2024 15:47:10 +1000 Subject: [PATCH] fix: Remove any trailing period or slash --- master/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/master/main.py b/master/main.py index 7bf7c04..ae2d56d 100644 --- a/master/main.py +++ b/master/main.py @@ -699,6 +699,13 @@ def addsite(): return jsonify({'error': 'Domain should not contain http:// or https://', 'success': 'false'}) domain = domain.lower() + + # Remove any trailing / or . + if domain.endswith('/'): + domain = domain.removesuffix('/') + if domain.endswith('.'): + domain = domain.removesuffix('.') + # Check if worker file exists workers = None try: