ruanwenjun commented on code in PR #13506:
URL: 
https://github.com/apache/dolphinscheduler/pull/13506#discussion_r1095708366


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/RegexUtils.java:
##########
@@ -26,7 +26,7 @@
  */
 public class RegexUtils {
 
-    private static final Pattern LINUX_USERNAME_PATTERN = 
Pattern.compile("^[a-zA-Z0-9_].{0,30}");
+    private static final Pattern LINUX_USERNAME_PATTERN = 
Pattern.compile("[a-zA-Z_][a-zA-Z\\d_-]{0,30}");

Review Comment:
   ```suggestion
       private static final Pattern LINUX_USERNAME_PATTERN = 
Pattern.compile("[a-zA-Z\\d_-].{0,30}");
   ```



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/RegexUtils.java:
##########
@@ -26,7 +26,7 @@
  */
 public class RegexUtils {
 
-    private static final Pattern LINUX_USERNAME_PATTERN = 
Pattern.compile("^[a-zA-Z0-9_].{0,30}");
+    private static final Pattern LINUX_USERNAME_PATTERN = 
Pattern.compile("[a-zA-Z_][a-zA-Z\\d_-]{0,30}");

Review Comment:
   Could you please add ut for this?



-- 
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