EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r998341443


##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -89,25 +89,44 @@ protected PropStoreKey(final InstanceId instanceId, final 
String path, final ID_
    */
   public static @Nullable PropStoreKey<?> fromPath(final String path) {
     String[] tokens = path.split("/");
+    if (tokens.length < 1) {
+      return null;
+    }
 
     InstanceId instanceId;
     try {
       instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
+
+      // needs to start with /accumulo/[instanceId]
+      if (!path.startsWith(ZooUtil.getRoot(instanceId))) {
+        log.warn(
+            "Path '{}' is invalid for a property cache key, expected to start 
with /accumulo/[instance_id]",

Review Comment:
   addressed in b9ef24d03b



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to