From 5be30572cbc412c5dbcfccdbdf97b3096e873133 Mon Sep 17 00:00:00 2001 From: s-choi Date: Fri, 25 Sep 2026 16:49:09 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=81=AE=E9=9A=9B=E3=80=81DB=E3=81=AB=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E3=83=91=E3=82=B9?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=83=89=E3=81=8C=E5=B9=B3=E6=96=87=E3=81=A0?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E3=82=89=E3=83=8F=E3=83=83=E3=82=B7=E3=83=A5?= =?UTF-8?q?=E5=8C=96=E3=81=97=E3=81=A6=E5=86=8D=E4=BF=9D=E5=AD=98=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=83=87=E3=83=A2=E7=94=A8?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97?= =?UTF-8?q?=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/service/impl/LoginServiceImpl.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/demo/app/domain/service/impl/LoginServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/LoginServiceImpl.java index 2ec04b3..26ef947 100644 --- a/src/main/java/com/example/demo/app/domain/service/impl/LoginServiceImpl.java +++ b/src/main/java/com/example/demo/app/domain/service/impl/LoginServiceImpl.java @@ -27,7 +27,22 @@ public class LoginServiceImpl implements LoginService { return null; } - boolean isValidPassword = BCrypt.checkpw(password, userEntity.getPassword()); + boolean isValidPassword = false; + if (userEntity.getPassword().length() <= 24) { + if (userEntity.getPassword().equals(password)) { + + userEntity.setPassword(BCrypt.hashpw(password, BCrypt.gensalt())); + userRepository.save(userEntity); + isValidPassword = true; + + } else { + return null; + } + + } else { + + isValidPassword = BCrypt.checkpw(password, userEntity.getPassword()); + } if (!isValidPassword) { return null;