mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 20:25:32 -04:00
fix(server): sanitize import path (#4094)
This commit is contained in:
parent
8a421eb778
commit
9c627920dd
@ -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 { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Transform, Type } from 'class-transformer';
|
import { Transform, Type } from 'class-transformer';
|
||||||
import { IsBoolean, IsDate, IsNotEmpty, IsString } from 'class-validator';
|
import { IsBoolean, IsDate, IsNotEmpty, IsString } from 'class-validator';
|
||||||
@ -67,12 +67,10 @@ export class ImportAssetDto extends CreateAssetBase {
|
|||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@Transform(toSanitized)
|
|
||||||
assetPath!: string;
|
assetPath!: string;
|
||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
@Optional()
|
@Optional()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@Transform(toSanitized)
|
|
||||||
sidecarPath?: string;
|
sidecarPath?: string;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user