potentally fix DoS exploit

This commit is contained in:
zefie
2024-05-04 11:27:56 -04:00
parent eb49e7b015
commit 59eeda7367
2 changed files with 10 additions and 5 deletions

View File

@@ -1682,9 +1682,8 @@ async function processRequest(socket, data_hex, skipSecure = false, encryptedReq
} else { } else {
socket_sessions[socket.id].headers = headers; socket_sessions[socket.id].headers = headers;
} }
} else { } else if (socket.ssid) {
// handle streaming POST
// handle streaming POST
if (socket_sessions[socket.id].expecting_post_data && headers) { if (socket_sessions[socket.id].expecting_post_data && headers) {
socket_sessions[socket.id].headers = headers; socket_sessions[socket.id].headers = headers;
if (socket_sessions[socket.id].post_data.length < (socket_sessions[socket.id].post_data_length * 2)) { if (socket_sessions[socket.id].post_data.length < (socket_sessions[socket.id].post_data_length * 2)) {
@@ -1807,8 +1806,14 @@ async function processRequest(socket, data_hex, skipSecure = false, encryptedReq
} }
} }
} }
} else {
cleanupSocket(socket);
} }
} else {
cleanupSocket(socket);
} }
} else {
cleanupSocket(socket);
} }
} }

View File

@@ -1,12 +1,12 @@
{ {
"name": "zefie_wtvp_minisrv", "name": "zefie_wtvp_minisrv",
"version": "0.9.45", "version": "0.9.47",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "zefie_wtvp_minisrv", "name": "zefie_wtvp_minisrv",
"version": "0.9.45", "version": "0.9.47",
"license": "GPL3", "license": "GPL3",
"dependencies": { "dependencies": {
"@mafintosh/vm2": "^3.9.2", "@mafintosh/vm2": "^3.9.2",