From 6b6fe3803e670eb6e27df69f604d5c87316a6950 Mon Sep 17 00:00:00 2001 From: 4cuck <40539855+4cuck@users.noreply.github.com> Date: Sun, 22 Oct 2023 13:36:48 +0200 Subject: [PATCH] fixup .well-known login --- server/src/admin.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/admin.rs b/server/src/admin.rs index 37c54cf..749f8d3 100644 --- a/server/src/admin.rs +++ b/server/src/admin.rs @@ -178,7 +178,7 @@ async fn login_inner( } VerificationMethod::HTTP => { let fetched_key = fetch_host_txt(&host.url, login_client, &config).await?; - verify_key(&fetched_key, &input.key).map(|_| host) + verify_key(fetched_key.trim(), &input.key).map(|_| host) } } } @@ -211,8 +211,7 @@ async fn fetch_host_txt( .send() .await .map_err(|e| LoginError::HttpFailure(request_url.clone(), e))?; - match true { - // result.status().is_success() + match result.status().is_success() { true => Ok(result.text().await.map_err(|e: reqwest::Error| { LoginError::InvalidResponse(request_url, e.to_string()) })?),