aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-01 15:18:13 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-01 15:18:13 +1300
commit53f70085891cdb0feae56df8990c1245091352a1 (patch)
tree79291f74ce2631a4a9a176b7e510028e534a23d4 /src/org/traccar
parent4ed22fb839fab2f19a6220bb8540317521209c4a (diff)
downloadtrackermap-server-53f70085891cdb0feae56df8990c1245091352a1.tar.gz
trackermap-server-53f70085891cdb0feae56df8990c1245091352a1.tar.bz2
trackermap-server-53f70085891cdb0feae56df8990c1245091352a1.zip
Fix warning reported by FindBugs tool
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/api/SecurityRequestFilter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/api/SecurityRequestFilter.java b/src/org/traccar/api/SecurityRequestFilter.java
index b1e090487..63295a8b7 100644
--- a/src/org/traccar/api/SecurityRequestFilter.java
+++ b/src/org/traccar/api/SecurityRequestFilter.java
@@ -18,6 +18,7 @@ package org.traccar.api;
import org.traccar.Context;
import org.traccar.model.User;
+import java.nio.charset.Charset;
import java.sql.SQLException;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.container.ContainerRequestContext;
@@ -35,7 +36,7 @@ public class SecurityRequestFilter implements ContainerRequestFilter {
auth = auth.replaceFirst("[B|b]asic ", "");
byte[] decodedBytes = DatatypeConverter.parseBase64Binary(auth);
if (decodedBytes != null && decodedBytes.length > 0) {
- return new String(decodedBytes).split(":", 2);
+ return new String(decodedBytes, Charset.defaultCharset()).split(":", 2);
}
return null;
}