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

This commit is contained in:
Joel Roth 2024-06-28 09:50:57 -04:00 committed by GitHub
parent 118b0c58dc
commit 9fd3e4c569
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3775,7 +3775,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
// Handle download of a server file by an agent
function handleAgentDownloadFile(req, res) {
const domain = checkUserIpAddress(req, res);
const domain = checkAgentIpAddress(req, res);
if (domain == null) { return; }
if (req.query.c == null) { res.sendStatus(404); return; }