From 37729269ba3cb3d1ffec582c97587fb288a7344b Mon Sep 17 00:00:00 2001 From: si458 Date: Tue, 1 Oct 2024 12:10:48 +0100 Subject: [PATCH] fix public folder sharing for domains without dns Signed-off-by: si458 --- webserver.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webserver.js b/webserver.js index 1e88f3d3..d370f105 100644 --- a/webserver.js +++ b/webserver.js @@ -3757,6 +3757,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF if (obj.common.validateString(req.path, 1, 4096) == false) { res.sendStatus(404); return; } var domainname = 'domain', spliturl = decodeURIComponent(req.path).split('/'), filename = ''; + if (spliturl[1] != 'userfiles') { spliturl.splice(1,1); } // remove domain.id from url for domains without dns if ((spliturl.length < 3) || (obj.common.IsFilenameValid(spliturl[2]) == false) || (domain.userQuota == -1)) { res.sendStatus(404); return; } if (domain.id != '') { domainname = 'domain-' + domain.id; } var path = obj.path.join(obj.filespath, domainname + '/user-' + spliturl[2] + '/Public');