- 본인확인 비밀번호 실패 관련 메시지 수정
- 계정 차단/로그아웃 메시지 보안 표현 강화 - 로그 및 계정 차단 사유 메시지 가독성 개선
This commit is contained in:
+7
-6
@@ -74,8 +74,9 @@ public class PasswordConfirmFailureTracker {
|
|||||||
|
|
||||||
if (failCount < limit) {
|
if (failCount < limit) {
|
||||||
return new Outcome(failCount, limit, false, false,
|
return new Outcome(failCount, limit, false, false,
|
||||||
"현재 비밀번호가 일치하지 않습니다. (초과 시 자동 "
|
policy.action() == Action.LOCK
|
||||||
+ (policy.action() == Action.LOCK ? "차단" : "로그아웃") + "됩니다)");
|
? "현재 비밀번호가 일치하지 않습니다. 보안을 위해 반복 실패 시 계정 이용이 제한됩니다."
|
||||||
|
: "현재 비밀번호가 일치하지 않습니다. 보안을 위해 반복 실패 시 자동 로그아웃됩니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean locked = false;
|
boolean locked = false;
|
||||||
@@ -84,12 +85,12 @@ public class PasswordConfirmFailureTracker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
forceLogout(session, request, response);
|
forceLogout(session, request, response);
|
||||||
log.warn("본인확인 비밀번호 {}회 실패로 {} 처리", failCount, locked ? "계정 차단" : "강제 로그아웃");
|
log.warn("본인확인 비밀번호 반복 실패로 {} 처리", locked ? "계정 차단" : "강제 로그아웃");
|
||||||
|
|
||||||
return new Outcome(failCount, limit, true, locked,
|
return new Outcome(failCount, limit, true, locked,
|
||||||
locked
|
locked
|
||||||
? "비밀번호 확인 " + limit + "회 실패로 계정이 차단되었습니다. 관리자에게 문의해 주세요."
|
? "비밀번호 확인 반복 실패로 계정이 차단되었습니다. 관리자에게 문의해 주세요."
|
||||||
: "비밀번호 확인 " + limit + "회 실패로 로그아웃되었습니다.");
|
: "비밀번호 확인 반복 실패로 로그아웃되었습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private int increment(HttpSession session) {
|
private int increment(HttpSession session) {
|
||||||
@@ -117,7 +118,7 @@ public class PasswordConfirmFailureTracker {
|
|||||||
user.setLoginFailureCount(limit);
|
user.setLoginFailureCount(limit);
|
||||||
portalUserRepository.save(user);
|
portalUserRepository.save(user);
|
||||||
}
|
}
|
||||||
accountLockService.lock(user, "본인확인 비밀번호 " + limit + "회 실패로 인한 계정 차단");
|
accountLockService.lock(user, "본인확인 비밀번호 반복 실패로 인한 계정 차단");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user