From 3bcfd9a4e6a10fd6584058786db68404de366702 Mon Sep 17 00:00:00 2001 From: Milky0217 Date: Fri, 24 Apr 2026 14:27:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(auth):=20web=5Flogin=5Fconfirm=20=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=8E=92=E6=9F=A5=20+=20=E7=B2=BE=E7=A1=AE?= =?UTF-8?q?=E5=8C=B9=E9=85=8Dcode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/handlers/auth.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handlers/auth.rs b/src/handlers/auth.rs index a78b0b2..dfa2d2f 100644 --- a/src/handlers/auth.rs +++ b/src/handlers/auth.rs @@ -470,8 +470,9 @@ pub async fn web_login_confirm( app_state: web::Data, ) -> impl Responder { let short_code = req.code.trim(); + log::info!("[web_login_confirm] received code={}", short_code); - // 查找登录码(模糊匹配,因为存入的是 ASD-XXXXXX 格式) + // 精确匹配登录码 let record: Option<(String, String, chrono::DateTime, Option)> = sqlx::query_as( "SELECT code, openid, expires_at, user_id FROM web_login_codes WHERE code = $1",