From dc6d3322dabb23c8435d304ff5e55a7ca353267b Mon Sep 17 00:00:00 2001 From: Jorrit Olthuis Date: Sun, 10 Dec 2023 13:55:09 +0100 Subject: [PATCH] Prevent hostless requests in hc-login (#34) --- hc-login | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hc-login b/hc-login index 9add37a..7b7c7f0 100755 --- a/hc-login +++ b/hc-login @@ -168,6 +168,8 @@ while True: if r.status_code != 302: break return_url = r.headers["location"] + if return_url.startswith("/"): + return_url = singlekey_host + return_url if return_url.startswith("hcauth://"): break debug(f"{return_url=}")