Skip to content

Commit

Permalink
Fixed plugin path check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylianst committed Jul 9, 2020
1 parent d1831e2 commit f412af4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pluginHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,6 @@ module.exports.pluginHandler = function (parent) {
obj.handleAdminReq = function (req, res, user, serv) {
if ((req.query.pin == null) || (obj.common.isAlphaNumeric(req.query.pin) !== true)) { res.sendStatus(401); return; }
var path = obj.path.join(obj.pluginPath, req.query.pin, 'views');
// path isn't a filename, it is a folder path
//if (obj.common.IsFilenameValid(path) !== true) { res.sendStatus(401); return; }
serv.app.set('views', path);
if ((obj.plugins[req.query.pin] != null) && (typeof obj.plugins[req.query.pin].handleAdminReq == 'function')) {
obj.plugins[req.query.pin].handleAdminReq(req, res, user);
Expand All @@ -531,8 +529,6 @@ module.exports.pluginHandler = function (parent) {
obj.handleAdminPostReq = function (req, res, user, serv) {
if ((req.query.pin == null) || (obj.common.isAlphaNumeric(req.query.pin) !== true)) { res.sendStatus(401); return; }
var path = obj.path.join(obj.pluginPath, req.query.pin, 'views');
// path isn't a filename, it is a folder path
//if (obj.common.IsFilenameValid(path) !== true) { res.sendStatus(401); return; }
serv.app.set('views', path);
if ((obj.plugins[req.query.pin] != null) && (typeof obj.plugins[req.query.pin].handleAdminPostReq == 'function')) {
obj.plugins[req.query.pin].handleAdminPostReq(req, res, user);
Expand Down

0 comments on commit f412af4

Please sign in to comment.