Ethanlm commented on a change in pull request #3247: [STORM-3619] Add null
check for topology name
URL: https://github.com/apache/storm/pull/3247#discussion_r405814652
##########
File path: storm-client/src/jvm/org/apache/storm/utils/Utils.java
##########
@@ -122,7 +122,9 @@
// tests by subclassing.
private static Utils _instance = new Utils();
private static String memoizedLocalHostnameString = null;
- public static final Pattern TOPOLOGY_KEY_PATTERN = Pattern.compile("^[\\w
\\t\\._-]+$", Pattern.UNICODE_CHARACTER_CLASS);
+ public static final Pattern BLOB_KEY_PATTERN =
+ Pattern.compile("^[\\w \\t\\._-]+$",
Pattern.UNICODE_CHARACTER_CLASS);
+ private static final Pattern TOPOLOGY_NAME_REGEX =
Pattern.compile("^[^/.:\\\\]+$");
Review comment:
Copied `TOPOLOGY_NAME_REGEX` from
storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java. We
should have a consistent check for topology name.
`TOPOLOGY_KEY_PATTERN` was originally only used for blob key. See
https://github.com/apache/storm/pull/2703
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services