From 3d1c64a4564a88239ec9837c1b0ac9367023fb64 Mon Sep 17 00:00:00 2001 From: tsmgeek Date: Mon, 14 Aug 2017 22:36:32 +0100 Subject: Trim/Lowercase email address used for auth --- src/org/traccar/database/DataManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org/traccar/database') diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index b7d3cb1e4..d5b4dd617 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -297,7 +297,7 @@ public class DataManager { public User login(String email, String password) throws SQLException { User user = QueryBuilder.create(dataSource, getQuery("database.loginUser")) - .setString("email", email) + .setString("email", email.trim().toLowerCase()) .executeQuerySingle(User.class); if (user != null && user.isPasswordValid(password)) { return user; -- cgit v1.2.3 From b2c8c6795f0e0c9265fa1c5db30ddd0bebfcc081 Mon Sep 17 00:00:00 2001 From: tsmgeek Date: Mon, 14 Aug 2017 23:06:45 +0100 Subject: Update DataManager.java --- src/org/traccar/database/DataManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org/traccar/database') diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index d5b4dd617..2e3e68bc9 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -297,7 +297,7 @@ public class DataManager { public User login(String email, String password) throws SQLException { User user = QueryBuilder.create(dataSource, getQuery("database.loginUser")) - .setString("email", email.trim().toLowerCase()) + .setString("email", email.trim()) .executeQuerySingle(User.class); if (user != null && user.isPasswordValid(password)) { return user; -- cgit v1.2.3