- If the file is other
the code is https://github.com/queckezz/koa-views/blob/master/src/index.js#L49
it uses map or consolidate, if map is not set, the render will be consolidate[file_ suffix], at last it uses **resolve** in node **path** package to handle the rootPath and the relPath, there is no crontrol of path outside root, the problem is here, thus if the render engine exists, such file can be rendered, for examples:
the code is at https://github.com/queckezz/koa-views/blob/master/src/index.js#L44
// path outside root if (UP_PATH_REGEXP.test(normalize('.' + sep + path))) { throw createError(403) }
http://127.0.0.1:7000/doc/..%2F..%2F..%2F..%2Fnode_modules%2Fkoa-views%2Ftest%2Ffixtures%2Fbasic.ejs http://127.0.0.1:7000/doc?file=../../../../node_modules/koa-views/test/fixtures/basic.ejs