Skip to content

High performance self-hosted photo and video management solution.

fix(server): sanitize import path (#4094)

Alex9c627920dd2d
diff --git a/server/src/immich/api-v1/asset/dto/create-asset.dto.ts b/server/src/immich/api-v1/asset/dto/create-asset.dto.ts
index cf80a34245..ac7aa4ddcb 100644
--- a/server/src/immich/api-v1/asset/dto/create-asset.dto.ts
+++ b/server/src/immich/api-v1/asset/dto/create-asset.dto.ts
@@ -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;
}