Extend username limit to 128-1
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include <openssl/sha.h> /* sha1 hash */
|
||||
#include "websocket.h"
|
||||
#include "jsonescape.h"
|
||||
#include "kasmpasswd.h"
|
||||
#include <network/Blacklist.h>
|
||||
|
||||
/*
|
||||
@@ -1756,7 +1755,7 @@ ws_ctx_t *do_handshake(int sock, char * const ip) {
|
||||
}
|
||||
|
||||
unsigned char owner = 0;
|
||||
char inuser[32] = "-";
|
||||
char inuser[USERNAME_LEN] = "-";
|
||||
if (!settings.disablebasicauth) {
|
||||
const char *hdr = strstr(handshake, "Authorization: Basic ");
|
||||
if (!hdr) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <stdint.h>
|
||||
#include "GetAPIEnums.h"
|
||||
#include "datelog.h"
|
||||
#include "kasmpasswd.h"
|
||||
|
||||
#define BUFSIZE 65536
|
||||
#define DBUFSIZE (BUFSIZE * 3) / 4 - 20
|
||||
@@ -57,7 +58,7 @@ typedef struct {
|
||||
char *tin_buf;
|
||||
char *tout_buf;
|
||||
|
||||
char user[32];
|
||||
char user[USERNAME_LEN];
|
||||
char ip[64];
|
||||
} ws_ctx_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user