Skip to content

[Document] HWPX 업로드 실제 파일 구조 검증 (ZIP·mimetype·section0.xml) #109

Closed

Description

@chaeliki

배경

#80(HWP/HWPX 업로드 지원)의 PR #91 리뷰에서 발견된 문제입니다.

Agent(문서 초안 작성) 쪽은 HWPX의 MIME만 보지 않고, 실제 ZIP 파일을 열어서
내부 mimetype=application/hwp+zip 값과 Contents/section0.xml 존재 여부를
확인합니다.

반면 Server(FileService)는 현재 요청 MIME이 application/hwp+zip이면
실제 파일 구조와 무관하게(일반 문자열이어도) 허용하고 있습니다. HWP는
OLE 시그니처까지 검증하는데, HWPX는 문자열 MIME 비교만 하고 있어
검증 수준이 불일치합니다.

완료 조건

  • FileService에 .hwpx 전용 분기 추가
  • HwpxSignatureValidator 신설 (HwpSignatureValidator와 같은 위치), 다음을 검사:
    • 정상적인 ZIP 파일인지
    • 내부 mimetype 값이 application/hwp+zip인지
    • Contents/section0.xml 또는 호환 경로가 존재하는지
  • 통합 테스트 추가:
    • 정상 HWPX + application/octet-stream → 성공
    • 일반 문자열 + application/hwp+zip → 415
    • 일반 ZIP이지만 HWPX 내부 파일이 없음 → 415

참고

Activity

  1. self-assigned this
    on Aug 7, 2026
  2. added
    area:serverSpring Boot API·도메인·DB·tenant·Task Workflow 영역; Prompt·모델·Provider 구현 제외
    priority:P1핵심 작업 다음으로 처리할 중요 작업
    security:privacy개인정보·접근권한·토큰·보안 영향이 있는 작업
    status:in-progress담당자가 현재 구현 중인 작업
    type:feature사용자 또는 Agent가 사용하는 기능 개발
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:serverSpring Boot API·도메인·DB·tenant·Task Workflow 영역; Prompt·모델·Provider 구현 제외priority:P1핵심 작업 다음으로 처리할 중요 작업security:privacy개인정보·접근권한·토큰·보안 영향이 있는 작업type:feature사용자 또는 Agent가 사용하는 기능 개발

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions