mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 17:14:01 +01:00
Fix off-by-one in username length check
This commit is contained in:
parent
6cd50869c2
commit
73c3bda8cd
@ -1794,7 +1794,7 @@ ws_ctx_t *do_handshake(int sock, char * const ip) {
|
||||
if (resppw && *resppw)
|
||||
resppw++;
|
||||
if (settings.passwdfile) {
|
||||
if (resppw && *resppw && resppw - response < 32) {
|
||||
if (resppw && *resppw && resppw - response < USERNAME_LEN + 1) {
|
||||
char pwbuf[4096];
|
||||
struct kasmpasswd_t *set = readkasmpasswd(settings.passwdfile);
|
||||
if (!set->num) {
|
||||
|
Loading…
Reference in New Issue
Block a user