fix: 보안 강화 및 안정성 개선
All checks were successful
Server CI/CD / deploy (push) Successful in 5s

- fileHash 빈 문자열 시 게임 업로드 거부 (A301.exe 누락 zip 차단)
- Rate limiting 추가: 인증 API 10req/min, 일반 API 60req/min
- 블록체인 트랜잭션 Idempotency-Key 미들웨어 (Redis 캐싱, 10분 TTL)
- 파일 업로드 크기 제한 4GB (BodyLimit)
- Username 대소문자 정규화 (Register/Login에서 소문자 변환)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 11:10:23 +09:00
parent 4843470310
commit 26876ba8ca
7 changed files with 123 additions and 21 deletions

View File

@@ -116,6 +116,10 @@ func (s *Service) Upload(filename string, body io.Reader, baseURL string) (*Info
}
fileHash := hashGameExeFromZip(finalPath)
if fileHash == "" {
os.Remove(finalPath)
return nil, fmt.Errorf("zip 파일에 %s이(가) 포함되어 있지 않습니다", "A301.exe")
}
info, err := s.repo.GetLatest()
if err != nil {