Skip to content

Commit 21a57b3

Browse files
Potential fix for code scanning alert no. 54: Inefficient regular expression
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 2f31bd5 commit 21a57b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/api/src/core/filestorage/_dto/filestorage.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class FilestorageCreateDto extends CustomFieldsDto {
3333
@IsString()
3434
@IsNotEmpty()
3535
@ApiProperty({ type: String, default: '/' })
36-
@Matches(/^\/(?:\.?[^\/\0]+\/?)+$/, { message: 'Path must be a valid path' })
36+
@Matches(/^\/([^\/\0]+\/)*[^\/\0]+\/?$/, { message: 'Path must be a valid path' })
3737
public path: string;
3838

3939
@IsOptional()

0 commit comments

Comments
 (0)