Skip to content

Commit

Permalink
fix: added the validation for no SQL injection in connection DTO
Browse files Browse the repository at this point in the history
Signed-off-by: KulkarniShashank <[email protected]>
  • Loading branch information
KulkarniShashank committed Apr 18, 2024
1 parent a815bd6 commit da26cd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/api-gateway/src/connection/dtos/connection.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import { IsNotSQLInjection } from '@credebl/common/cast.helper';
export class CreateOutOfBandConnectionInvitation {
@ApiPropertyOptional()
@IsOptional()
@IsNotSQLInjection({ message: 'label is required.' })
label?: string;

@ApiPropertyOptional()
@IsOptional()
@IsNotSQLInjection({ message: 'alias is required.' })
alias?: string;

@ApiPropertyOptional()
Expand Down Expand Up @@ -64,12 +62,14 @@ export class CreateConnectionDto {
@IsOptional()
@IsString({ message: 'alias must be a string' })
@IsNotEmpty({ message: 'please provide valid alias' })
@IsNotSQLInjection({ message: 'alias is required.' })
alias: string;

@ApiPropertyOptional()
@IsOptional()
@IsString({ message: 'label must be a string' })
@IsNotEmpty({ message: 'please provide valid label' })
@IsNotSQLInjection({ message: 'label is required.' })
label: string;

@ApiPropertyOptional()
Expand Down

0 comments on commit da26cd2

Please sign in to comment.