password fix

This commit is contained in:
shimingxy
2019-12-08 19:39:29 +08:00
parent f01a82c13d
commit 5bb59b7a99
3 changed files with 7 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ public class SafeController {
String confirmPassword){
UserInfo userInfo =WebContext.getUserInfo();
_logger.debug("decipherable old : "+userInfo.getDecipherable());
_logger.debug("decipherable new : "+PasswordReciprocal.getInstance().rawPassword(userInfo.getUsername(), userInfo.getPassword()));
_logger.debug("decipherable new : "+ReciprocalUtils.encode(PasswordReciprocal.getInstance().rawPassword(userInfo.getUsername(), newPassword)));
if(newPassword.equals(confirmPassword)){
if(oldPassword==null ||
passwordEncoder.matches(PasswordReciprocal.getInstance().rawPassword(userInfo.getUsername(),oldPassword), userInfo.getPassword())){
@@ -123,7 +123,8 @@ public class SafeController {
@RequestParam("confirmPassword") String confirmPassword) {
UserInfo userInfo =WebContext.getUserInfo();
_logger.debug("App Login Password : "+ReciprocalUtils.decoder(userInfo.getAppLoginPassword()));
_logger.debug("App Login Password : "+userInfo.getAppLoginPassword());
_logger.debug("App Login new Password : "+ReciprocalUtils.encode(newPassword));
if(newPassword.equals(confirmPassword)){
if(StringUtils.isNullOrBlank(userInfo.getAppLoginPassword())||userInfo.getAppLoginPassword().equals(ReciprocalUtils.encode(oldPassword))){
userInfo.setAppLoginPassword(ReciprocalUtils.encode(newPassword));

View File

@@ -14,7 +14,8 @@
<td colspan="2"><@locale code="login.totp.title" /></td>
</tr>
<tr>
<td> <img id="captchaimg" src="<@base/>/image/${id}" /></td>
<td> <img id="captchaimg" src="<@base/>/image/${id}" /><br>
支持<b>Google Authenticator等</b></td>
<td style="width:75%;">
<table class="table" style="width:100%;">
<tr>