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') 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