From 79621f2d0f9439269ebe839a210442713e755bf0 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Sat, 22 Jun 2024 16:36:41 +1000 Subject: [PATCH] fix: Remove any trailing dots --- website/routes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/routes.py b/website/routes.py index 857f80c..fb3d15c 100644 --- a/website/routes.py +++ b/website/routes.py @@ -263,7 +263,7 @@ def hnsid_domain(domain): @bp.route("/txt", methods=["POST"]) def txtLogin(): # Get domain from form - domain = request.form.get("domain").lower().strip().replace("/", "") + domain = request.form.get("domain").lower().strip().replace("/", "").removesuffix(".") # Get uuid uuid = session["uuid"] @@ -326,11 +326,11 @@ def txtLogin(): custom=""), 200 @bp.route("/txt/") -def txtLoginDomain(domain): +def txtLoginDomain(domain:str): # Get uuid uuid = session["uuid"] - idns_records = get_idns_records(domain.lower().strip().replace("/", "")) + idns_records = get_idns_records(domain.lower().strip().replace("/", "").removesuffix(".")) for record in idns_records: