{"record":{"id":"9f18a6c49615e68b","repo":"paascloud/paascloud-master","slug":"uac10011036","errorCode":"UAC10011036","errorMessage":"ErrorCodeEnum.UAC10011036","messagePattern":"ErrorCodeEnum\\.UAC10011036","errorType":"error_code","errorClass":"UacBizException","httpStatus":null,"severity":"warning","filePath":"paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/UacUserServiceImpl.java","lineNumber":462,"sourceCode":"\t\tPreconditions.checkArgument(!PublicUtil.isEmpty(confirmPwd), ErrorCodeEnum.UAC10011009.msg());\n\t\tPreconditions.checkArgument(newPassword.equals(confirmPwd), \"两次密码不一致, 请重新输入！\");\n\n\n\t\tUacUser user = uacUserMapper.findByLoginName(loginName);\n\t\tif (PublicUtil.isEmpty(user)) {\n\t\t\tthrow new UacBizException(ErrorCodeEnum.UAC10011002, loginName);\n\t\t}\n\n\t\tString oldPwd = user.getLoginPwd();\n\t\tString newEncrypt = Md5Util.encrypt(newPassword);\n\n\t\tif (!Md5Util.matches(oldPassword, oldPwd)) {\n\t\t\tthrow new UacBizException(ErrorCodeEnum.UAC10011035);\n\t\t}\n\n\t\tUacUser uacUser = new UacUser();\n\t\tif (Md5Util.matches(newPassword, oldPwd)) {\n\t\t\tthrow new UacBizException(ErrorCodeEnum.UAC10011036);\n\t\t}\n\n\t\tuacUser.setLoginPwd(Md5Util.encrypt(newPassword));\n\t\tuacUser.setId(user.getId());\n\t\tuacUser.setLoginPwd(newEncrypt);\n\t\t// 该用户已经修改过密码\n\t\tuacUser.setIsChangedPwd(Short.valueOf(\"1\"));\n\t\tuacUser.setUpdateInfo(authResDto);\n\n\t\treturn uacUserMapper.updateByPrimaryKeySelective(uacUser);\n\n\t\t// TODO 发送重置密码成功的邮件\n\t}\n\n\t@Override\n\tpublic int userResetPwd(UserResetPwdDto userResetPwdDto) {\n\t\tString mobileNo = userResetPwdDto.getMobileNo();\n\t\tString newPassword = userResetPwdDto.getNewPassword();","sourceCodeStart":444,"sourceCodeEnd":480,"githubUrl":"https://github.com/paascloud/paascloud-master/blob/781281a9503332ed3cef44ea618349d14230a127/paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/UacUserServiceImpl.java#L444-L480","documentation":"UAC10011036 is thrown by UacUserServiceImpl.userModifyPwd when the proposed newPassword is identical to the current stored password (Md5Util.matches(newPassword, oldPwd) is true). The service enforces that a password change must actually change the password, preventing no-op updates.","triggerScenarios":"Calling userModifyPwd(loginName, oldPassword, newPassword, confirmNewPassword) with newPassword equal (after MD5 hashing) to the existing password — e.g. user re-enters the same password.","commonSituations":"Users re-submitting a form without changing the password field; password policies requiring rotation where reuse of the current password must be rejected; frontend defaulting the new-password field to the old value.","solutions":["Require the user to pick a password different from the current one before submitting","Add a client-side check comparing newPassword against the old password before the API call","Catch UacBizException code UAC10011036 and prompt 'new password must differ from current'","If a same-password change is legitimate in your flow, handle it without calling userModifyPwd"],"exampleFix":"// before\nuacUserService.userModifyPwd(loginName, oldPwd, newPwd, confirmPwd);\n// after\nif (!Objects.equals(newPwd, oldPwd)) {\n    uacUserService.userModifyPwd(loginName, oldPwd, newPwd, confirmPwd);\n}","handlingStrategy":"validation","validationCode":"if (Objects.equals(newPassword, oldPassword)) {\n    throw new IllegalArgumentException(\"new password must differ from current\");\n}","typeGuard":null,"tryCatchPattern":"try { uacUserService.userModifyPwd(loginName, oldPwd, newPwd, confirmPwd); } catch (UacBizException e) { if (\"UAC10011036\".equals(e.getCode())) { /* prompt: choose a different password */ } }","preventionTips":["Compare new vs old password client-side before submitting","Enforce password policies that require an actual change","Avoid defaulting the new-password field to the old value in forms"],"tags":["password","validation","password-reuse"],"backgroundTag":"invalid-argument-value","analyzedSha":"781281a9503332ed3cef44ea618349d14230a127","analyzedAt":"2026-09-10T10:59:02.070Z","contentChangedAt":"2026-09-10T10:59:02.070Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}