generated from ttipo/project-base
fix(backend): 명함 배경 그림 경로에 앱 내장 svg 허용
앱의 기본 명함 배경(assets/svg/card_bg/*.svg)이 svg 라 검증에 걸렸다. 경로 문자열만 저장하고 서버가 파일을 내려주지 않으므로 svg 를 막을 이유가 없다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user