Parcourir la source

修复密码为空时修改错误的bug

zhouhao il y a 8 ans
Parent
commit
3ca7d5c98f

+ 1 - 1
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-service/hsweb-system-authorization-service-simple/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleUserService.java

@@ -163,7 +163,7 @@ public class SimpleUserService extends AbstractService<UserEntity, String>
         tryValidateProperty(!userExists, GenericEntity.id, "{username_exists}");
         List<String> updateProperties = Arrays.asList("name");
         //修改密码
-        if (!StringUtils.hasLength(userEntity.getPassword())) {
+        if (StringUtils.hasLength(userEntity.getPassword())) {
             //密码强度验证
             tryValidateProperty(usernameValidator, UserEntity.password, userEntity.getPassword());
             //密码MD5