aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-19 12:07:54 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-11-19 12:07:54 +1300
commit532a00aca413a700defc1013252bce05b727f2a9 (patch)
tree6a9957d823f7e5a7da9e2c60cff18c80db09de45 /src/org/traccar
parentfd2bdeac1fbba374860dcb210c7d66f51bef50d5 (diff)
downloadtrackermap-server-532a00aca413a700defc1013252bce05b727f2a9.tar.gz
trackermap-server-532a00aca413a700defc1013252bce05b727f2a9.tar.bz2
trackermap-server-532a00aca413a700defc1013252bce05b727f2a9.zip
Check for empty token
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/model/User.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java
index 411b556fc..e6b9d663f 100644
--- a/src/org/traccar/model/User.java
+++ b/src/org/traccar/model/User.java
@@ -187,7 +187,7 @@ public class User extends Extensible {
}
public void setToken(String token) {
- if (token != null) {
+ if (token != null && !token.isEmpty()) {
if (!token.matches("^[a-zA-Z0-9]{16,}$")) {
throw new IllegalArgumentException("Illegal token");
}