diff --git a/source/docs/tentative.md b/source/docs/tentative.md index 8370666..81530b2 100644 --- a/source/docs/tentative.md +++ b/source/docs/tentative.md @@ -1601,7 +1601,7 @@ module.exports = (req, res, logFacilities, config, next) => { if (req.parsedURL.pathname == "/page.svr") { fs.readFile(".template", (err, data) => { if (err) throw err; //EVIL!!! - let id = req.parsedURL.searchParams.get("id"); + let id = req.parsedURL.query.id; if (!id) id = "index"; if (fs.existsSync("pages/" + id + ".html")) { fs.readFile("pages/" + id + ".html", (err2, data2) => { @@ -1643,7 +1643,7 @@ module.exports = (req, res, logFacilities, config, next) => { res.error(500, err); return; } - let id = req.parsedURL.searchParams.get("id"); + let id = req.parsedURL.query.id; if (!id) id = "index"; id = id.replace(/\\/g,"/").replace(/(?:\/|^)\.\.(?=(\/|$))/g,"$1").replace(/\/+/g,"/"); //Poor mans path sanitiation if (fs.existsSync("pages/" + id + ".html")) {