mirror of https://github.com/mirror/busybox.git
adduser: Allow '@', '%', '/' and '\' in username
Allow '@', '%', '/' and '\' in username for adduser command to support usernames in the form of : username@domain username%domain domain/username domain\username Username in those forms may have some limitations in various services like email, ssh, but simply disallowing them prevents more generic use of the username based on email address or name with realm.pull/7/head
parent
3459024bf4
commit
d94d2b0a9e
|
@ -32,6 +32,10 @@ void FAST_FUNC die_if_bad_username(const char *name)
|
|||
/* These chars are valid unless they are at the 1st pos: */
|
||||
if (*name == '-'
|
||||
|| *name == '.'
|
||||
|| *name == '@'
|
||||
|| *name == '%'
|
||||
|| *name == '/'
|
||||
|| *name == '\\'
|
||||
/* $ is allowed if it's the last char: */
|
||||
|| (*name == '$' && !name[1])
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue