From 2dff900f171a2f78b9de77dd256b6d9fe55e1304 Mon Sep 17 00:00:00 2001 From: Jorrit Olthuis Date: Sun, 10 Dec 2023 13:58:29 +0100 Subject: [PATCH] Handle 307 redirects in hc-login --- hc-login | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hc-login b/hc-login index 9add37a..4633172 100755 --- a/hc-login +++ b/hc-login @@ -165,7 +165,7 @@ if return_url.startswith("/"): while True: r = session.get(return_url, allow_redirects=False) debug(f"{return_url=}, {r} {r.text}") - if r.status_code != 302: + if r.status_code != 302 and r.status_code != 307: break return_url = r.headers["location"] if return_url.startswith("hcauth://"):