From 3d4b8e01c7f6906ffd0c65e0788c7ef7a54f13c9 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Tue, 3 Sep 2019 09:20:02 -0600 Subject: [PATCH] Validate SLM policy ids strictly (#45998) (#46145) This uses strict validation for SLM policy ids, similar to what we use for index names. Resolves #45997 --- .../xpack/core/slm/SnapshotLifecyclePolicy.java | 8 +++----- .../xpack/slm/SnapshotLifecyclePolicyTests.java | 3 ++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/slm/SnapshotLifecyclePolicy.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/slm/SnapshotLifecyclePolicy.java index 24e319c9b56..ddb05ad1df1 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/slm/SnapshotLifecyclePolicy.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/slm/SnapshotLifecyclePolicy.java @@ -128,11 +128,9 @@ public class SnapshotLifecyclePolicy extends AbstractDiffable, /, ?]", "invalid snapshot name []: must not contain contain" + " the following characters [ , \", *, \\, <, |, ,, >, /, ?]", "invalid repository name [ ]: cannot be empty",