1
0
Fork 0
forked from svrjs/svrjs

Fix bug with mods executing in wrong order (bug was related with access control vulnerability fix; bug was not present in LTS versions)

This commit is contained in:
Dorian Niemiec 2023-09-12 23:15:55 +02:00
parent 80dbafe3ee
commit 84b7cac684

4
svr.js
View file

@ -2642,7 +2642,7 @@ if (!cluster.isPrimary) {
}); });
var modFunction = ffinals; var modFunction = ffinals;
proxyMods.reverse().forEach(function (proxyMod) { proxyMods.slice().reverse().forEach(function (proxyMod) {
modFunction = proxyMod.proxyCallback(req, socket, head, configJSON, serverconsole, modFunction); modFunction = proxyMod.proxyCallback(req, socket, head, configJSON, serverconsole, modFunction);
}); });
modFunction(); modFunction();
@ -3255,7 +3255,7 @@ if (!cluster.isPrimary) {
}); });
} }
useMods.reverse().forEach(function (modO) { useMods.slice().reverse().forEach(function (modO) {
modFunction = modO.callback(req, res, serverconsole, responseEnd, href, ext, uobject, search, "index.html", users, page404, head, foot, "", modFunction, configJSON, callServerError, getCustomHeaders, origHref, redirect, parsePostData); modFunction = modO.callback(req, res, serverconsole, responseEnd, href, ext, uobject, search, "index.html", users, page404, head, foot, "", modFunction, configJSON, callServerError, getCustomHeaders, origHref, redirect, parsePostData);
}); });