cku328 commented on a change in pull request #812:
URL: https://github.com/apache/hadoop-ozone/pull/812#discussion_r414884429
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
##########
@@ -328,5 +328,19 @@ private OzoneConsts() {
public static final String GDPR_SECRET = "secret";
public static final String GDPR_ALGORITHM = "algorithm";
+ /**
+ * Block key name as illegal characters
+ *
+ * This regular expression is used to check if key name
+ * contains illegal characters when creating/renaming key.
+ *
+ * Avoid the following characters in a key name:
+ * "\", "{", "}", "^", "<", ">", "#", "|", "%", "`", "[", "]", "~", "?"
+ * and Non-printable ASCII characters (128–255 decimal characters).
+ * https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
+ */
+ public static final String KEYNAME_AVOID_CHARACTERS_REGEX =
+ "^[^^{}<>^?%~#`\\[\\]\\|\\\\(\\x80-\\xff)]$";
Review comment:
Thanks! I fixed it.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]