easy-waf integrations now reverts req.body variable after checking the request body.

This commit is contained in:
Dorian Niemiec 2024-02-14 14:35:36 +01:00
parent d65b5f4e89
commit bb80de16e4

View file

@ -112,6 +112,7 @@ Mod.prototype.callback = function callback(req, res, serverconsole, responseEnd,
return function() {
logm[req.socket.remoteAddress] = serverconsole;
if(!logm[req.socket.remoteAddress].locwarnmessage) logm[req.socket.remoteAddress].locwarnmessage = logm[req.socket.remoteAddress].errmessage;
var oldReqBody = req.body;
function easyWafCallback() {
//EasyWaf
@ -129,6 +130,7 @@ Mod.prototype.callback = function callback(req, res, serverconsole, responseEnd,
}
} else {
try {
req.body = oldReqBody;
elseCallback();
} catch (ex) {
if (callServerError) {