From 84bb7410cfb19544412e29490446144bce39e740 Mon Sep 17 00:00:00 2001 From: cuijiawang Date: Tue, 30 Sep 2025 10:19:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=99=BB=E5=BD=95=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agileboot/auth/service/strategy/PasswordAuthStrategy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agileboot-system/wol-auth/src/main/java/com/agileboot/auth/service/strategy/PasswordAuthStrategy.java b/agileboot-system/wol-auth/src/main/java/com/agileboot/auth/service/strategy/PasswordAuthStrategy.java index 317fb03..35cc820 100644 --- a/agileboot-system/wol-auth/src/main/java/com/agileboot/auth/service/strategy/PasswordAuthStrategy.java +++ b/agileboot-system/wol-auth/src/main/java/com/agileboot/auth/service/strategy/PasswordAuthStrategy.java @@ -3,6 +3,7 @@ package com.agileboot.auth.service.strategy; import cn.dev33.satoken.stp.StpUtil; import cn.dev33.satoken.stp.parameter.SaLoginParameter; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.crypto.digest.BCrypt; import com.agileboot.auth.pojo.form.PasswordLoginBody; import com.agileboot.auth.pojo.vo.CurrentLoginUserVO; import com.agileboot.auth.pojo.vo.LoginVO; @@ -61,7 +62,7 @@ public class PasswordAuthStrategy implements IAuthStrategy { if (!Objects.equals(loginUser.getClientId(), clientId)) { throw new BizException("client.not.match"); } - loginService.checkLogin(LoginType.PASSWORD, null, loginUser.getUsername(), () -> false); + loginService.checkLogin(LoginType.PASSWORD, null, loginUser.getUsername(), () -> !BCrypt.checkpw(password, loginUser.getPassword())); loginUser.setClientKey(client.getClientKey()); loginUser.setDeviceType(client.getDeviceType());