fix(deleted): tombstone 이 응답 키를 지워 소비자가 죽던 문제 — 모양 유지·값만 중립화 - #604
Merged
Conversation
실장애(2026-07-31 밤): 삭제글 상세를 열면 500. 글 상세 화면이 post.views.toLocaleString() 을 무가드로 부르는데 #602 가 tombstone 에서 views 키를 통째로 없애 undefined 가 됐다. 목록 레이아웃은 deleted_at 분기가 있어 안전했고, 그래서 검증이 목록만 훑고 상세를 놓쳤다. 보안 요구는 '실제 값을 내보내지 말 것'이지 '키를 없앨 것'이 아니었다. 키를 유지하고 값만 중립화하면 유출은 그대로 막히면서 프론트·앱·외부 소비자 어느 쪽도 깨지지 않는다. - 글 tombstone: title/author/author_id/category/views/likes/dislikes/ has_file/is_secret/is_comments_disabled/link1/link2/author_ip/ updated_at/thumbnail* 를 빈값·0·false 로 유지 - 댓글 tombstone: author/author_id/likes/dislikes/author_ip/updated_at/ is_secret 동일 (댓글 렌더도 comment.author.charAt(0) 무가드) - 테스트를 '키 집합 고정'에서 '살아있는 응답과 같은 모양 + 값 중립화' 검증으로 교체 — 키 삭제 회귀를 잡는다
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔴 실장애 수정
삭제글 상세를 열면 500. 분당 9건, 사용자가 글을 못 보는 상태였다.
원인: #602 가 삭제글 tombstone 에서
views키를 통째로 제거했는데, 글 상세 화면이post.views.toLocaleString()을 무가드로 호출한다(view/basic.svelte:311,report.svelte:353). 삭제글을 여는 순간 undefined 접근.목록 레이아웃 13개는
deleted_at분기가 있어 안전했고, 검증이 목록만 훑고 상세를 놓쳤다.근본 수정 — 키를 지우지 않고 값만 중립화
보안 요구는 "실제 값을 내보내지 말 것" 이지 "키를 없앨 것" 이 아니었다. 키 삭제는 응답 계약을 깨서 모든 소비자(웹·네이티브 앱·외부)를 위험에 빠뜨린다.
"",0,false)댓글 tombstone 도 같은 결함이 있어 함께 고쳤다(
comment.author.charAt(0)무가드 3곳).테스트
'키 집합이 정확히 N개' → '살아있는 응답과 같은 키를 전부 갖되 값이 중립인가' 로 교체. 키 삭제 회귀를 자동으로 잡는다. 기존 테스트 3건이 이 변경으로 실패해 함께 갱신(전부 '키 부재' → '값이 빈값' 검사).