Skip to content

Commit

Permalink
fix: code scanning
Browse files Browse the repository at this point in the history
Signed-off-by: dev-callgent <dev@callgent.com>
  • Loading branch information
dev-callgent committed May 23, 2024
1 parent 7e6b9dd commit 9357bbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class RestApiController {
@Get('/invoke/result/:requestId')
async invokeResult(@Param('requestId') reqId: string) {
// FIXME
return reqId;
return null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export class UsersService {

const credentials = pwd ? await Utils.hashSalted(pwd) : undefined;
if (id) {
if (!(pwd?.length >= 8))
if (!pwd || pwd?.length < 8)

Check failure

Code scanning / CodeQL

Type confusion through parameter tampering Critical

Potential type confusion as
this HTTP request parameter
may be either an array or a string.
throw new BadRequestException(
'Password should be at least 8 characters',
);
Expand Down

0 comments on commit 9357bbe

Please sign in to comment.