From 607ff5c474fe56a1dcca122b1cf7720530434c6a Mon Sep 17 00:00:00 2001 From: TtiPo Date: Sun, 11 Oct 2026 17:59:28 +0900 Subject: [PATCH] =?UTF-8?q?fix(backend):=20=EB=AA=85=ED=95=A8=20=EB=B0=B0?= =?UTF-8?q?=EA=B2=BD=20=EA=B7=B8=EB=A6=BC=20=EA=B2=BD=EB=A1=9C=EC=97=90=20?= =?UTF-8?q?=EC=95=B1=20=EB=82=B4=EC=9E=A5=20svg=20=ED=97=88=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 앱의 기본 명함 배경(assets/svg/card_bg/*.svg)이 svg 라 검증에 걸렸다. 경로 문자열만 저장하고 서버가 파일을 내려주지 않으므로 svg 를 막을 이유가 없다. Co-Authored-By: Claude Opus 5.5 --- backend/src/modules/pet-card/dto/pet-card.dto.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/modules/pet-card/dto/pet-card.dto.ts b/backend/src/modules/pet-card/dto/pet-card.dto.ts index d04a04c..97e4cf8 100644 --- a/backend/src/modules/pet-card/dto/pet-card.dto.ts +++ b/backend/src/modules/pet-card/dto/pet-card.dto.ts @@ -13,9 +13,12 @@ import { IsHexColor } from '@/common/validators'; import { SCRIM_TONES } from '../entities/pet-card.entity'; import type { PetCard, ScrimTone } from '../entities/pet-card.entity'; -/** 앱에 들어 있는 배경 그림 경로 — 경로 탈출·다른 형식을 막는다 */ +/** + * 앱에 들어 있는 배경 그림 경로 (assets/svg/card_bg/bg_1.svg 등) — 경로 탈출·다른 형식을 막는다. + * 앱 번들 안의 경로를 가리킬 뿐 서버가 이 파일을 내려주지 않으므로 svg 도 받는다. + */ const ASSET_PATH_PATTERN = - /^assets\/[A-Za-z0-9_-]+(\/[A-Za-z0-9_-]+)*\.(png|jpg|jpeg|webp)$/; + /^assets\/[A-Za-z0-9_-]+(\/[A-Za-z0-9_-]+)*\.(png|jpg|jpeg|webp|svg)$/; /** 명함 꾸미기 값 (앱의 CardStyle) — 배경은 색·그림·사진 중 하나만 */ export class CardStyleDto {