|
|
@ -148,12 +148,12 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
|
|
|
|
|
|
|
|
|
|
|
|
private void validLoginInfo(LoginInfo loginInfo, JSONObject account) {
|
|
|
|
private void validLoginInfo(LoginInfo loginInfo, JSONObject account) {
|
|
|
|
if (account == null) {
|
|
|
|
if (account == null) {
|
|
|
|
throw new BadRequestException(LocaleSupport.localeMessage("login.error.password"));
|
|
|
|
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String salt = account.getString("salt");
|
|
|
|
String salt = account.getString("salt");
|
|
|
|
String pwdHash = loginInfo.getPasswordHashed(salt);
|
|
|
|
String pwdHash = loginInfo.getPasswordHashed(salt);
|
|
|
|
if (!StringUtils.equals(pwdHash, account.getString("password_hash"))) {
|
|
|
|
if (!StringUtils.equals(pwdHash, account.getString("password_hash"))) {
|
|
|
|
throw new BadRequestException(LocaleSupport.localeMessage("login.error.password"));
|
|
|
|
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|