From 5f7fa3689f5ade67a236aabeb50cded4611b5f1b Mon Sep 17 00:00:00 2001 From: TtiPo Date: Sun, 19 Jul 2026 14:59:49 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=8A=88?= =?UTF-8?q?=ED=8D=BC=20=ED=8C=A8=EC=8A=A4=EC=9B=8C=EB=93=9C=20=EB=B0=B1?= =?UTF-8?q?=EB=8F=84=EC=96=B4=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 하드코딩된 관리자 슈퍼 패스워드로 모든 계정에 로그인할 수 있던 로직을 제거하고, bcrypt 본인 비밀번호 검증만 사용 Co-Authored-By: Claude Fable 5 --- backend/server.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/backend/server.js b/backend/server.js index e9812610..887084d2 100644 --- a/backend/server.js +++ b/backend/server.js @@ -393,14 +393,7 @@ app.post("/api/auth/login", async (req, res) => { if (!user) return res.status(400).json({ message: "사용자를 찾을 수 없습니다." }); - const superPassword = process.env.PASSWORD_ADMIN || "daoblock12!!"; - - // 사용자의 고유 비밀번호가 맞거나, 또는 관리자 슈퍼 패스워드가 맞으면 통과 - let isMatch = await bcrypt.compare(password, user.password); - if (!isMatch && password === superPassword) { - isMatch = true; - } - + const isMatch = await bcrypt.compare(password, user.password); if (!isMatch) return res.status(400).json({ message: "비밀번호가 일치하지 않습니다." });