From 9bf68a499b961d38904f287c61514c3b5934fc32 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sat, 26 Apr 2025 16:53:51 -0400 Subject: [PATCH] Added case-insensitive logins --- README.md | 2 +- src/schemas/user/userSchema.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d35b5b6..03e2e51 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Canopy - 0.2.1-INDEV +Canopy - 0.2.2-INDEV ====== Canopy - /ˈkæ.nə.pi/: diff --git a/src/schemas/user/userSchema.js b/src/schemas/user/userSchema.js index f98a137..6fcc9bc 100644 --- a/src/schemas/user/userSchema.js +++ b/src/schemas/user/userSchema.js @@ -253,7 +253,7 @@ userSchema.statics.authenticate = async function(user, pass, failLine = "Bad Use } //get the user if it exists - const userDB = await this.findOne({ user }); + const userDB = await this.findOne({ user: new RegExp(user, 'i')}); //if not scream and shout if(!userDB){