Skip to content

Commit

Permalink
instructor register problem fixed with url
Browse files Browse the repository at this point in the history
  • Loading branch information
abinth11 committed Sep 9, 2023
1 parent 0a0b0fa commit 6057c77
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions server/src/app/usecases/auth/instructorAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,23 @@ export const instructorRegister = async (
instructorRepository: ReturnType<InstructorDbInterface>,
authService: ReturnType<AuthServiceInterface>
) => {
instructor.certificates = []
console.log(instructor);

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This logs sensitive data returned by
an access to password
as clear text.
instructor.certificates = [];
instructor.profilePic = {
name: '',
key: '',
url: ''
};
if (files) {
files.map((file) => {
if (file.originalname === 'profilePic') {
instructor.profilePic.url = file.path;
instructor.profilePic.name=file.originalname
} else {
const certificate = {
name:file.originalname,
url:file.path
}
name: file.originalname,
url: file.path
};
instructor.certificates.push(certificate);
}
});
Expand All @@ -42,6 +49,7 @@ export const instructorRegister = async (
if (password) {
instructor.password = await authService.hashPassword(password);
}
console.log(instructor)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This logs sensitive data returned by
an access to password
as clear text.
const response = await instructorRepository.addInstructor(instructor);
return response
? { status: true, message: 'successfully registered!' }
Expand Down

0 comments on commit 6057c77

Please sign in to comment.