Skip to content

Commit

Permalink
fix(server): add length limits for function template name (#1333)
Browse files Browse the repository at this point in the history
  • Loading branch information
HUAHUAI23 authored Jun 29, 2023
1 parent 55507f3 commit fdc3119
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class FunctionTemplateItemDto {
description: 'FunctionTemplate item name',
})
@IsNotEmpty()
@MaxLength(48)
@Matches(/^[a-zA-Z0-9_.\-\/]{1,256}$/)
name: string

Expand All @@ -46,7 +47,7 @@ export class CreateFunctionTemplateDto {
@ApiProperty({ description: 'function template name' })
@IsNotEmpty()
@IsString()
@MaxLength(64)
@MaxLength(32)
name: string

@ApiProperty({ description: 'Dependencies', type: [CreateDependencyDto] })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class UpdateFunctionTemplateDto {

@ApiProperty({ description: 'Template name' })
@IsNotEmpty()
@MaxLength(64)
@MaxLength(32)
@IsString()
name: string

Expand Down

0 comments on commit fdc3119

Please sign in to comment.