Check agent IP address instead of user IP address for agent file downloads. (#6155)

Joel Roth committed Jun 28, 2024 at 09:50 UTC 9fd3e4c569ea773e5ce7422405bb2783910565c1
1 file changed +1 -1
webserver.js
+1 -1
@@ -3775,7 +3775,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
3775
3776 // Handle download of a server file by an agent
3777 function handleAgentDownloadFile(req, res) {
3778 - const domain = checkUserIpAddress(req, res);
3778 + const domain = checkAgentIpAddress(req, res);
3779 if (domain == null) { return; }
3780 if (req.query.c == null) { res.sendStatus(404); return; }
3781