fix: 3차 리뷰 LOW — 에러 메시지 일관성, Redis 타임아웃, 입력 검증
- 5개 핸들러 err.Error() → 제네릭 메시지 (Login, Refresh, SSAFY, Ticket, BossRaid) - Redis context.Background() → WithTimeout 5s (10곳) - SprintMultiplier 범위 검증 추가 - 방어적 문서화 (SSAFY 충돌, zip bomb, body limit prefix, 로그 주입) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,9 @@ func validateGameData(data *GameDataRequest) error {
|
||||
if data.AttackRange != nil && (*data.AttackRange < 0 || *data.AttackRange > 100) {
|
||||
return fmt.Errorf("attack_range must be 0-100")
|
||||
}
|
||||
if data.SprintMultiplier != nil && (*data.SprintMultiplier < 0 || *data.SprintMultiplier > 10) {
|
||||
return fmt.Errorf("sprint_multiplier must be 0-10")
|
||||
}
|
||||
if data.PlayTimeDelta != nil && *data.PlayTimeDelta < 0 {
|
||||
return fmt.Errorf("플레이 시간 변화량은 0 이상이어야 합니다")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user