From debc7172fd95da03f053ef70c8e0cf35b915cb53 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 12 Jul 2018 11:18:19 +1000 Subject: [PATCH] Fix missing this causing unnormalized key to be validated By: md_5 --- paper-api/src/main/java/org/bukkit/NamespacedKey.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/NamespacedKey.java b/paper-api/src/main/java/org/bukkit/NamespacedKey.java index ea8738adca..1ed8f7e40d 100644 --- a/paper-api/src/main/java/org/bukkit/NamespacedKey.java +++ b/paper-api/src/main/java/org/bukkit/NamespacedKey.java @@ -68,8 +68,8 @@ public final class NamespacedKey { this.key = key.toLowerCase().toLowerCase(Locale.ROOT); // Check validity after normalization - Preconditions.checkArgument(VALID_NAMESPACE.matcher(namespace).matches(), "namespace"); - Preconditions.checkArgument(VALID_KEY.matcher(key).matches(), "key"); + Preconditions.checkArgument(VALID_NAMESPACE.matcher(this.namespace).matches(), "namespace"); + Preconditions.checkArgument(VALID_KEY.matcher(this.key).matches(), "key"); String string = toString(); Preconditions.checkArgument(string.length() < 256, "NamespacedKey must be less than 256 characters (%s)", string);