From 95900a110947dfdda84aca69738d4c2b7f4857f2 Mon Sep 17 00:00:00 2001 From: derzombiiie Date: Wed, 18 Aug 2021 11:11:53 +0200 Subject: [PATCH] idk about the fstream vuln idk how 2 change it in unzip/package.json should work fine for me though (dont pipe user input to lib at all) --- Fixed pager "<" button --- config/admin.yaml | 2 +- html/js/entry.js | 2 +- logs/log.log | 7 +++++++ node/app.js | 4 ---- node_modules/unzip/package.json | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/config/admin.yaml b/config/admin.yaml index 2125e8f..d6abbd9 100644 --- a/config/admin.yaml +++ b/config/admin.yaml @@ -1 +1 @@ -passhash: jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg= +passhash: orYffX13k8Hledqig+irQcwkLclKuOM0IaxZd0+CrA8= diff --git a/html/js/entry.js b/html/js/entry.js index bc6f626..81d189c 100644 --- a/html/js/entry.js +++ b/html/js/entry.js @@ -127,7 +127,7 @@ function pager( len, index ) { let h = `
\n` p.page = 0 h += `<<\n` - if ( index > -1 ) { + if ( 0 <= ( index - 1 ) ) { p.page = index - 1 h += `<\n` } diff --git a/logs/log.log b/logs/log.log index 20f5531..dc36bc3 100644 --- a/logs/log.log +++ b/logs/log.log @@ -948,3 +948,10 @@ err, crashed!" 1629236486859 | Reading posts sorted by "hot" with a length of 5 1629236502608 | Reading postindex 1629236503046 | Reading posts sorted by "hot" with a length of 5 +--- SEPERATOR --- +--- SEPERATOR --- +1629277392514 | Dumping config: +1629277392520 | {"debug":false,"logging":1337,"logfile":"logs/log.log","ipget_endpoint_set":"//derzombiiie.com/getip.php?settoken=${TOKEN}","ipget_endpoint_get":"//derzombiiie.com/getip.php?token=${TOKEN}","cl":true,"site_name":"blog.derzombiiie.com","search_enable":false,"search_only_tags":true,"commenting_enabled":true,"post_ranking_auto":43200,"index_post_sort":"new","comment_sync_on_write":false,"comment_auto_sync":360} +1629277393188 | Reading posts sorted by "new" with a length of 10 +1629277810539 | Reading posts sorted by "new" with a length of 10 +1629277893885 | Reading posts sorted by "new" with a length of 10 diff --git a/node/app.js b/node/app.js index 2b0e772..8cf5386 100644 --- a/node/app.js +++ b/node/app.js @@ -208,10 +208,6 @@ app.get("/posts", (req, res) => { let index = req.query.page ? req.query.page * len : 0 let pagecount = Math.floor( postsDB.get("len") / len) - console.log("len "+len) - console.log("index "+index) - console.log("pc "+pagecount) - if( typeof( req.query.hot) != "undefined" ) { if( ! ( req.query.len < 50 ) ) { res.status( 400 ) diff --git a/node_modules/unzip/package.json b/node_modules/unzip/package.json index 7cb3f2c..978c37b 100644 --- a/node_modules/unzip/package.json +++ b/node_modules/unzip/package.json @@ -32,7 +32,7 @@ "bundleDependencies": false, "dependencies": { "binary": "~0.3.0", - "fstream": "~0.1.18", + "fstream": ">=1.0.12", "pullstream": "0.0.4" }, "deprecated": false,