diff options
author | Anton Tananaev <anton@traccar.org> | 2023-11-02 07:01:44 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-11-02 07:01:44 -0700 |
commit | 38bea83f8d52675b1d211d972ac419fb208d198b (patch) | |
tree | d16f3ae654f69478c2788771fb2daf39cd301d45 /src/main | |
parent | d4c4daa491ae70d608b3e791f4ad8b07ced43437 (diff) | |
download | trackermap-server-38bea83f8d52675b1d211d972ac419fb208d198b.tar.gz trackermap-server-38bea83f8d52675b1d211d972ac419fb208d198b.tar.bz2 trackermap-server-38bea83f8d52675b1d211d972ac419fb208d198b.zip |
Handle empty TOTP field
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/api/security/LoginService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/security/LoginService.java b/src/main/java/org/traccar/api/security/LoginService.java index 8eb5537fa..829f5d2fa 100644 --- a/src/main/java/org/traccar/api/security/LoginService.java +++ b/src/main/java/org/traccar/api/security/LoginService.java @@ -127,7 +127,7 @@ public class LoginService { private void checkUserCode(User user, Integer code) throws SecurityException { String key = user.getTotpKey(); - if (key != null) { + if (key != null && !key.isEmpty()) { if (code == null) { throw new CodeRequiredException(); } |