diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-19 12:07:54 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-19 12:07:54 +1300 |
commit | 532a00aca413a700defc1013252bce05b727f2a9 (patch) | |
tree | 6a9957d823f7e5a7da9e2c60cff18c80db09de45 /src/org/traccar/model | |
parent | fd2bdeac1fbba374860dcb210c7d66f51bef50d5 (diff) | |
download | traccar-server-532a00aca413a700defc1013252bce05b727f2a9.tar.gz traccar-server-532a00aca413a700defc1013252bce05b727f2a9.tar.bz2 traccar-server-532a00aca413a700defc1013252bce05b727f2a9.zip |
Check for empty token
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r-- | src/org/traccar/model/User.java | 2 |
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"); } |