- middleware: JWT MapClaims 타입 단언 패닉 → ok 패턴으로 방어 - auth/service: Redis Set 오류 처리, 지갑 생성 실패 시 유저 롤백 - auth/service: EnsureAdmin 지갑 생성 추가, Logout 리프레시 토큰도 삭제 - auth/service: 리프레시 토큰 발급(7일) 및 로테이션, REFRESH_SECRET 분리 - auth/handler: Login 응답에 refreshToken 포함, Refresh 핸들러 추가 - auth/handler: Logout 에러 처리 추가 - download/service: hashGameExeFromZip io.Copy 오류 처리 - download/handler: Content-Disposition mime.FormatMediaType으로 헤더 인젝션 방어 - announcement/handler: Update 빈 body 400 반환 - config: REFRESH_SECRET 환경변수 추가 - routes: POST /api/auth/refresh 엔드포인트 추가 - main: INTERNAL_API_KEY 미설정 시 경고 출력 - .env.example: 누락 환경변수 7개 보완 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package download
|
||||
|
||||
import (
|
||||
"mime"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@@ -50,7 +51,7 @@ func (h *Handler) ServeFile(c *fiber.Ctx) error {
|
||||
if info != nil && info.FileName != "" {
|
||||
filename = info.FileName
|
||||
}
|
||||
c.Set("Content-Disposition", `attachment; filename="`+filename+`"`)
|
||||
c.Set("Content-Disposition", mime.FormatMediaType("attachment", map[string]string{"filename": filename}))
|
||||
return c.SendFile(path)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user