- 입력 검증 강화 (로그인/체인 핸들러 전체) - boss raid 비관적 잠금으로 동시성 문제 해결 - SSAFY 사용자명 sanitize + 트랜잭션 처리 - constant-time API 키 비교, 보안 헤더, graceful shutdown - 안전하지 않은 기본값 경고 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package download
|
||||
|
||||
import (
|
||||
"log"
|
||||
"mime"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -42,7 +43,8 @@ func (h *Handler) Upload(c *fiber.Ctx) error {
|
||||
body := c.Request().BodyStream()
|
||||
info, err := h.svc.Upload(filename, body, h.baseURL)
|
||||
if err != nil {
|
||||
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "업로드 실패: " + err.Error()})
|
||||
log.Printf("game upload failed: %v", err)
|
||||
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "게임 파일 업로드에 실패했습니다"})
|
||||
}
|
||||
return c.JSON(info)
|
||||
}
|
||||
@@ -65,7 +67,8 @@ func (h *Handler) UploadLauncher(c *fiber.Ctx) error {
|
||||
body := c.Request().BodyStream()
|
||||
info, err := h.svc.UploadLauncher(body, h.baseURL)
|
||||
if err != nil {
|
||||
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "업로드 실패: " + err.Error()})
|
||||
log.Printf("launcher upload failed: %v", err)
|
||||
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": "런처 업로드에 실패했습니다"})
|
||||
}
|
||||
return c.JSON(info)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user