paascloud/paascloud-master · warning · UacBizException

UAC10011036

UAC10011036

Error message

ErrorCodeEnum.UAC10011036

What it means

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.

Solutions

  1. Require the user to pick a password different from the current one before submitting
  2. Add a client-side check comparing newPassword against the old password before the API call
  3. Catch UacBizException code UAC10011036 and prompt 'new password must differ from current'
  4. If a same-password change is legitimate in your flow, handle it without calling userModifyPwd

Example fix

// before
uacUserService.userModifyPwd(loginName, oldPwd, newPwd, confirmPwd);
// after
if (!Objects.equals(newPwd, oldPwd)) {
    uacUserService.userModifyPwd(loginName, oldPwd, newPwd, confirmPwd);
}
Defensive patterns

Strategy: validation

Validate before calling

if (Objects.equals(newPassword, oldPassword)) {
    throw new IllegalArgumentException("new password must differ from current");
}

Try / catch

try { uacUserService.userModifyPwd(loginName, oldPwd, newPwd, confirmPwd); } catch (UacBizException e) { if ("UAC10011036".equals(e.getCode())) { /* prompt: choose a different password */ } }

Prevention

When it happens

Trigger: Calling userModifyPwd(loginName, oldPassword, newPassword, confirmNewPassword) with newPassword equal (after MD5 hashing) to the existing password — e.g. user re-enters the same password.

Common situations: 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.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of paascloud/paascloud-master@781281a950 (2026-09-10). Data as JSON: /api/errors/9f18a6c49615e68b. Report an issue: GitHub.

Appendix: source

Thrown at paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/UacUserServiceImpl.java:462

		Preconditions.checkArgument(!PublicUtil.isEmpty(confirmPwd), ErrorCodeEnum.UAC10011009.msg());
		Preconditions.checkArgument(newPassword.equals(confirmPwd), "两次密码不一致, 请重新输入!");


		UacUser user = uacUserMapper.findByLoginName(loginName);
		if (PublicUtil.isEmpty(user)) {
			throw new UacBizException(ErrorCodeEnum.UAC10011002, loginName);
		}

		String oldPwd = user.getLoginPwd();
		String newEncrypt = Md5Util.encrypt(newPassword);

		if (!Md5Util.matches(oldPassword, oldPwd)) {
			throw new UacBizException(ErrorCodeEnum.UAC10011035);
		}

		UacUser uacUser = new UacUser();
		if (Md5Util.matches(newPassword, oldPwd)) {
			throw new UacBizException(ErrorCodeEnum.UAC10011036);
		}

		uacUser.setLoginPwd(Md5Util.encrypt(newPassword));
		uacUser.setId(user.getId());
		uacUser.setLoginPwd(newEncrypt);
		// 该用户已经修改过密码
		uacUser.setIsChangedPwd(Short.valueOf("1"));
		uacUser.setUpdateInfo(authResDto);

		return uacUserMapper.updateByPrimaryKeySelective(uacUser);

		// TODO 发送重置密码成功的邮件
	}

	@Override
	public int userResetPwd(UserResetPwdDto userResetPwdDto) {
		String mobileNo = userResetPwdDto.getMobileNo();
		String newPassword = userResetPwdDto.getNewPassword();

View on GitHub (pinned to 781281a950)