로그인 슈퍼 패스워드 백도어 제거
Deploy / deploy (push) Failing after 0s

하드코딩된 관리자 슈퍼 패스워드로 모든 계정에 로그인할 수 있던 로직을 제거하고, bcrypt 본인 비밀번호 검증만 사용

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 14:59:49 +09:00
parent a45cb39a57
commit 5f7fa3689f
+1 -8
View File
@@ -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: "비밀번호가 일치하지 않습니다." });