Skip to content

Commit

Permalink
Apply code scanning fix for database query built from user-controlled…
Browse files Browse the repository at this point in the history
… sources

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
wajeht and github-advanced-security[bot] authored Sep 22, 2024
1 parent ea2dee2 commit febe4c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/views.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export async function postResetAPIKeyPage(

export async function getVerifyEmailPage(req: Request, res: Response) {
const { token, email } = req.query as { token: string; email: string };
const foundUser = await User.findOne({ email });
const foundUser = await User.findOne({ email: { $eq: email } });

if (!foundUser) {
req.flash('error', 'Something wrong while verifying your account!');
Expand Down

0 comments on commit febe4c5

Please sign in to comment.