From 3b720ebdcfd8f00003c36cf72d859bb21d269cc4 Mon Sep 17 00:00:00 2001 From: Tacx <12997062+tacxou@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:30:32 +0100 Subject: [PATCH] Fix code scanning alert no. 14: Inefficient regular expression Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/core/filestorage/_dto/filestorage.dto.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/filestorage/_dto/filestorage.dto.ts b/src/core/filestorage/_dto/filestorage.dto.ts index 5348060c..8bafe828 100644 --- a/src/core/filestorage/_dto/filestorage.dto.ts +++ b/src/core/filestorage/_dto/filestorage.dto.ts @@ -33,7 +33,7 @@ export class FilestorageCreateDto extends CustomFieldsDto { @IsString() @IsNotEmpty() @ApiProperty({ type: String, default: '/' }) - @Matches(/^\/(\.?[^\/\0]+\/?)+$/, { message: 'Path must be a valid path' }) + @Matches(/^\/(?:\.?[^\/\0]+\/?)+$/, { message: 'Path must be a valid path' }) public path: string; @IsOptional()