Skip to content

Commit 09038a3

Browse files
Fix code scanning alert no. 3: Database query built from user-controlled sources
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 0c0fe38 commit 09038a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/accounts.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ router.get("/user", async (req, res, next) => {
128128
username = username.substring(1);
129129
}
130130
const user = await db.collection("users").findOne({
131-
username: username,
132-
discriminator: discriminator,
131+
username: { $eq: username },
132+
discriminator: { $eq: discriminator },
133133
});
134134

135135
if (user === null) {

0 commit comments

Comments
 (0)