From 150413f3e0b2c97f39a95ca997eb9fc433df4ab3 Mon Sep 17 00:00:00 2001 From: jowg-amazon Date: Fri, 5 Apr 2024 11:27:05 -0700 Subject: [PATCH] change regex to 0-256 chars Signed-off-by: jowg-amazon --- .../org/opensearch/commons/alerting/model/DocLevelQuery.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt index 6f6d0115..4b520677 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt @@ -80,7 +80,7 @@ data class DocLevelQuery( const val QUERY_FIELD_NAMES_FIELD = "query_field_names" const val NO_ID = "" val INVALID_CHARACTERS: List = listOf(" ", "[", "]", "{", "}", "(", ")") - val QUERY_NAME_REGEX = "^.{1,256}$".toRegex() // regex to restrict string length to 1-256 chars + val QUERY_NAME_REGEX = "^.{0,256}$".toRegex() // regex to restrict string length 256 chars @JvmStatic @Throws(IOException::class)