You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Tejaskriya (via GitHub)" <gi...@apache.org> on 2023/09/13 10:52:45 UTC

[GitHub] [ozone] Tejaskriya commented on a diff in pull request #5276: HDDS-8920. Ozone is supporting unicode volume and bucket names, potentially unintentionally

Tejaskriya commented on code in PR #5276:
URL: https://github.com/apache/ozone/pull/5276#discussion_r1324334758


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/client/HddsClientUtils.java:
##########
@@ -132,9 +132,17 @@ private static boolean isSupportedCharacter(char c, boolean isStrictS3) {
     // ozone allows namespace to follow other volume/bucket naming convention,
     // for example, here supports '_',
     // which is a valid character in POSIX-compliant system, like HDFS.
-    return (c == '.' || c == '-' ||
-        Character.isLowerCase(c) || Character.isDigit(c)) ||
-        (c == '_' && !isStrictS3);
+    int code = c;
+    if (code >= 47 && code <= 57) { // 0 - 9

Review Comment:
   Thank you for the suggestion, I've changed it to character comparison now



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org