Extend username limit to 128-1
This commit is contained in:
@@ -89,7 +89,7 @@ VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
|
||||
|
||||
user[0] = '\0';
|
||||
const char *at = strrchr(peerEndpoint.buf, '@');
|
||||
if (at && at - peerEndpoint.buf > 1 && at - peerEndpoint.buf < 32) {
|
||||
if (at && at - peerEndpoint.buf > 1 && at - peerEndpoint.buf < USERNAME_LEN) {
|
||||
memcpy(user, peerEndpoint.buf, at - peerEndpoint.buf);
|
||||
user[at - peerEndpoint.buf] = '\0';
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include <rfb/Timer.h>
|
||||
#include <rfb/unixRelayLimits.h>
|
||||
|
||||
#include "kasmpasswd.h"
|
||||
|
||||
namespace rfb {
|
||||
class VNCServerST;
|
||||
|
||||
@@ -318,7 +320,7 @@ namespace rfb {
|
||||
rdr::U64 bstats_total[BS_NUM];
|
||||
struct timeval connStart;
|
||||
|
||||
char user[32];
|
||||
char user[USERNAME_LEN];
|
||||
char kasmpasswdpath[4096];
|
||||
bool needsPermCheck;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user