JohnYuu commented on code in PR #13506:
URL:
https://github.com/apache/dolphinscheduler/pull/13506#discussion_r1095736354
##########
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:
I think only '-' matches [a-zA-Z\\d_-].{0,30}, pure numbers are also matches
[a-zA-Z\\d_-].{0,30}; such as '-', 123456; but these are not valid linux user
names!
--
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]