security: revert auto-upgrade failure logging (keep silent per request)

사용자 요청으로 평문→해시 자동 업그레이드 저장 실패 시 console.error 로그를
원래대로 조용한 catch 로 되돌림. 나머지 보안 개선(로그인 rate-limit,
account.local.json 분리, secure 쿠키 옵션)은 유지.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 13:23:17 +09:00
parent f392842d7f
commit 651c63faa6

View File

@@ -114,9 +114,8 @@ opRouter.post('/op', async (req, res, next) => {
try {
matched.password = hashPassword(password)
await writeAccounts(accounts)
} catch (err) {
// 로그인 자체는 진행하되, 평문이 계속 남는 상황이므로 반드시 로그로 알린다.
console.error('[auth] 비밀번호 해시 자동 업그레이드 저장 실패(평문 유지됨):', (err as Error).message)
} catch {
// 업그레이드 실패는 로그인 자체에 영향 주지 않음.
}
}
req.session.userId = matched.id