aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-11-02 07:01:44 -0700
committerAnton Tananaev <anton@traccar.org>2023-11-02 07:01:44 -0700
commit38bea83f8d52675b1d211d972ac419fb208d198b (patch)
treed16f3ae654f69478c2788771fb2daf39cd301d45 /src/main
parentd4c4daa491ae70d608b3e791f4ad8b07ced43437 (diff)
downloadtrackermap-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.java2
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();
}