chengshiwen commented on a change in pull request #5093:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/5093#discussion_r597661381



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/RegexUtils.java
##########
@@ -30,6 +30,8 @@
      */
     private static final String CHECK_NUMBER = "^-?\\d+(\\.\\d+)?$";
 
+    private static final String LINUX_USERNAME_PATTERN = 
"[a-z_][a-z\\d_]{0,30}";

Review comment:
       This regular expression pattern is not correct. 
`[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[$]?` should be used by `man useradd` and it has 
better compatibility.
   
   
![image](https://user-images.githubusercontent.com/4902714/111784824-cdbd4e00-88f6-11eb-8806-4c879755ed2a.png)
   




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


Reply via email to