mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
ocserv-main should limit the maximum message size a client can send
Resolves: #244 Signed-off-by: Alan Jowett <alanjo@microsoft.com>
This commit is contained in:
@@ -256,6 +256,13 @@ int handle_worker_commands(main_server_st * s, struct proc_st *proc)
|
|||||||
|
|
||||||
length = ret;
|
length = ret;
|
||||||
|
|
||||||
|
if (length > MAX_MSG_SIZE) {
|
||||||
|
mslog(s, proc, LOG_DEBUG,
|
||||||
|
"received too big message (%d)", (int)length);
|
||||||
|
ret = ERR_BAD_COMMAND;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
mslog(s, proc, LOG_DEBUG, "main received worker's message '%s' of %u bytes\n",
|
mslog(s, proc, LOG_DEBUG, "main received worker's message '%s' of %u bytes\n",
|
||||||
cmd_request_to_str(cmd), (unsigned)length);
|
cmd_request_to_str(cmd), (unsigned)length);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user