aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
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/test/java
parentcd8ac19111d704e0257acc07ce104d47c857f778 (diff)
downloadtrackermap-server-d9f127b979ff52731552edecd1d0762c21eb4403.tar.gz
trackermap-server-d9f127b979ff52731552edecd1d0762c21eb4403.tar.bz2
trackermap-server-d9f127b979ff52731552edecd1d0762c21eb4403.zip
Better MAC address validation
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/ProtocolTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/java/org/traccar/ProtocolTest.java b/src/test/java/org/traccar/ProtocolTest.java
index 3e27bbe28..5e37f44b9 100644
--- a/src/test/java/org/traccar/ProtocolTest.java
+++ b/src/test/java/org/traccar/ProtocolTest.java
@@ -323,7 +323,7 @@ public class ProtocolTest extends BaseTest {
if (position.getNetwork().getWifiAccessPoints() != null) {
for (WifiAccessPoint wifiAccessPoint : position.getNetwork().getWifiAccessPoints()) {
- assertTrue("validation failed for mac address with zero value", !wifiAccessPoint.getMacAddress().equals("0"));
+ assertTrue(wifiAccessPoint.getMacAddress().matches("((\\p{XDigit}{2}):){5}(\\p{XDigit}{2})"));
}
}
}