Browse Source

fix 密码RSA

he2802 3 years ago
parent
commit
5a59d3561c

+ 3 - 3
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -832,14 +832,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
                 InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("config/pri.key");
                 rsaPrivate = AES.getStringByInputStream_1(certStream);
                 certStream.close();
-                password = AES.decrypt(user.getPassword(),rsaPrivate);
+                password = AES.decrypt(bo.getPwd(),rsaPrivate);
             } catch (Exception e) {
                 e.printStackTrace();
             }
         }else{
-            password = user.getPassword();
+            password = bo.getPwd();
         }
-        if (!SecurityUtils.matchesPassword(bo.getPwd(),password))
+        if (!SecurityUtils.matchesPassword(password,user.getPassword()))
         {
             throw new BaseException("密码错误");
         }