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