-
-
Notifications
You must be signed in to change notification settings - Fork 180
Description
I'm connecting to a Linux FTP server that has usernames with a .
. The current regex ([\w\-]+
) doesn't allow this, and so no directories are listed (side note: would it make sense to error when none of the matchers match and the line isn't empty? It was very confusing at first).
According to the Ubuntu manpage for adduser:
adduser and addgroup enforce conformity to IEEE Std 1003.1-2001, which allows only the following characters to appear in group and user names: letters, digits, underscores, periods, at signs (@) and dashes. The name may no start with a dash. The "$" sign is allowed at the end of usernames (to conform to samba).
Now, some distros may have more stringent restrictions, but I suggest that the regex be expanded to at least accept the pattern mentioned in the manpage for Ubuntu. I think the regex would be [A-Za-z0-9][A-Za-z0-9\-\.\_\@]*[\$]{0,1}
.
If you agree, I opened #507 to address this.