mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
check for bad usernames early in session setup
This commit is contained in:
parent
69d90a8af1
commit
657836599a
@ -858,6 +858,12 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
|
||||
domain,native_os,native_lanman));
|
||||
}
|
||||
|
||||
/* don't allow for weird usernames */
|
||||
alpha_strcpy(user, user, ". _-", sizeof(user));
|
||||
if (strstr(user, "..")) {
|
||||
return bad_password_error(inbuf, outbuf);
|
||||
}
|
||||
|
||||
DEBUG(3,("sesssetupX:name=[%s]\n",user));
|
||||
|
||||
/* If name ends in $ then I think it's asking about whether a */
|
||||
|
Loading…
Reference in New Issue
Block a user