From cf749d0e6f9eb3377ee5fdd8946d61d0e3a21a6e Mon Sep 17 00:00:00 2001 From: Sander Verbruggen Date: Wed, 27 Mar 2024 11:51:48 +0100 Subject: [PATCH] FDP-2004: Recognize PSK change correctly Signed-off-by: Sander Verbruggen --- .../gxf/crestdevicesimulator/simulator/response/PskExtractor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/PskExtractor.kt b/application/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/PskExtractor.kt index 0e0add3..800f8b7 100644 --- a/application/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/PskExtractor.kt +++ b/application/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/PskExtractor.kt @@ -12,7 +12,7 @@ object PskExtractor { * Group 1 containing the next 16 chars after PSK: this is only the key * Group 2 containing the next 64 chars after the key this is only the hash */ - private val pskKeyHashSplitterRegex = "!PSK:([a-zA-Z0-9]{16})([a-zA-Z0-9]{64});PSK:[a-zA-Z0-9]{16}[a-zA-Z0-9]{64}SET".toRegex() + private val pskKeyHashSplitterRegex = "!PSK:([a-zA-Z0-9]{16}):([a-zA-Z0-9]{64});PSK:[a-zA-Z0-9]{16}:[a-zA-Z0-9]{64}SET".toRegex() fun hasPskCommand(command: String) = pskKeyHashSplitterRegex.matches(command)