From 4201568f2b4c57bbd873be7cb166ae48531a917f Mon Sep 17 00:00:00 2001 From: Argo-Surface Date: Mon, 18 Feb 2019 15:16:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9AMongoDB=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E7=99=BB=E5=BD=95=E7=94=A8=E6=88=B7=E5=90=8D?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=A4=A7=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.DataAccess.MongoDB/User.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bootstrap.DataAccess.MongoDB/User.cs b/Bootstrap.DataAccess.MongoDB/User.cs index c9d6e2cc..53b08715 100644 --- a/Bootstrap.DataAccess.MongoDB/User.cs +++ b/Bootstrap.DataAccess.MongoDB/User.cs @@ -47,7 +47,7 @@ namespace Bootstrap.DataAccess.MongoDB { if (string.IsNullOrEmpty(userName) && string.IsNullOrEmpty(password)) return false; - var u = DbManager.Users.Find(user => user.UserName == userName).FirstOrDefault(); + var u = DbManager.Users.Find(user => user.UserName.Equals(userName, StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); return !string.IsNullOrEmpty(u.PassSalt) && u.Password == LgbCryptography.ComputeHash(password, u.PassSalt); }