fix(server): sanitize import path (#4094)
This commit is contained in:
parent
8a421eb778
commit
9c627920dd
1 changed files with 1 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Optional, toBoolean, toSanitized, UploadFieldName } from '@app/domain';
|
||||
import { Optional, toBoolean, UploadFieldName } from '@app/domain';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Transform, Type } from 'class-transformer';
|
||||
import { IsBoolean, IsDate, IsNotEmpty, IsString } from 'class-validator';
|
||||
|
@ -67,12 +67,10 @@ export class ImportAssetDto extends CreateAssetBase {
|
|||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@Transform(toSanitized)
|
||||
assetPath!: string;
|
||||
|
||||
@IsString()
|
||||
@Optional()
|
||||
@IsNotEmpty()
|
||||
@Transform(toSanitized)
|
||||
sidecarPath?: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue