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');