aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-29 07:16:25 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-29 07:16:25 -0700
commitd9f127b979ff52731552edecd1d0762c21eb4403 (patch)
treed652c69ead9761f7741031086fb46a4a9dad93f9 /src/main/java/org/traccar
parentcd8ac19111d704e0257acc07ce104d47c857f778 (diff)
downloadtrackermap-server-d9f127b979ff52731552edecd1d0762c21eb4403.tar.gz
trackermap-server-d9f127b979ff52731552edecd1d0762c21eb4403.tar.bz2
trackermap-server-d9f127b979ff52731552edecd1d0762c21eb4403.zip
Better MAC address validation
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/B2316ProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/B2316ProtocolDecoder.java b/src/main/java/org/traccar/protocol/B2316ProtocolDecoder.java
index a45c315b3..635806b2d 100644
--- a/src/main/java/org/traccar/protocol/B2316ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/B2316ProtocolDecoder.java
@@ -116,8 +116,9 @@ public class B2316ProtocolDecoder extends BaseProtocolDecoder {
String[] points = item.getString("wi").split(";");
for (String point : points) {
String[] values = point.split(",");
+ String mac = values[0].replaceAll("(..)", "$1:");
network.addWifiAccessPoint(WifiAccessPoint.from(
- values[0].replaceAll("(..)", "$1:"), Integer.parseInt(values[1])));
+ mac.substring(0, mac.length() - 1), Integer.parseInt(values[1])));
}
}