From dd9199be507a24b6b41b58fdfaeae41261db59d5 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Sun, 21 Apr 2024 19:05:36 +0800 Subject: [PATCH] =?UTF-8?q?revert(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20mock=E6=AD=A3=E5=88=99=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/api/dto/mockserver/KeyValueInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/mockserver/KeyValueInfo.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/mockserver/KeyValueInfo.java index 9b1bdb6b74..d059660aad 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/mockserver/KeyValueInfo.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/mockserver/KeyValueInfo.java @@ -55,7 +55,7 @@ public class KeyValueInfo { } } else if (StringUtils.equals(this.condition, ParamConditionEnums.REGULAR_MATCH.name())) { try { - return this.value.matches(value); + return this.value.matches(Pattern.quote(value)); } catch (Exception e) { return false; }