reverted i think

master
derzombiiie 2021-08-15 23:21:52 +02:00
parent 95fbd11b32
commit b8e208adfe
4 changed files with 47 additions and 10 deletions

View File

@ -9,7 +9,7 @@
# (strings are the things with "quotes" and booleans are true / false)
debug: false # enable / disable debug mode
logging: 10 # WIP - adjust logging levels
logging: 1337 # WIP - adjust logging levels
# -1 - none
# 0 - basic (Logs new comments)
# 10 - datahorder (Logs everything (all requests with ip + timestamp))

View File

@ -13,7 +13,6 @@
<script>
postDATA = "a"//<!--POST-DATA-INJECT-->//
</script>
<script src="/config.js"></script>
<script src="/static/js/themes.js"></script>
<script src="/static/js/menubar.js"></script>
<script src="/static/js/entry.js"></script>

View File

@ -446,3 +446,47 @@ err, crashed!"
1628767211968 | Reading comments from post "1", with length: undefined
1628767250069 | Reading post 1
1628767250346 | Reading comments from post "1", with length: undefined
--- SEPERATOR ---
1628767650703 | Dumping config:
1628767650709 | {"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}
1628767656088 | Reading post 1
1628767656369 | Reading comments from post "1", with length: undefined
1628767665050 | Reading post 1
1628767665359 | Reading comments from post "1", with length: undefined
1628767696281 | Reading comments from post "1", with length: undefined
1628767696371 | Trying to comment to post "1", from ip "94.134.179.229" (tkn: 191078430294275) with content: "Commentar"
| Call me <>"
1628767704077 | Reading post 1
1628767704364 | Reading comments from post "1", with length: undefined
1628767736894 | Reading comments from post "1", with length: undefined
1628767739242 | Reading comments from post "1", with length: undefined
--- SEPERATOR ---
1628767871706 | Dumping config:
1628767871712 | {"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}
1628767872271 | Reading comments from post "1", with length: undefined
1628767875649 | Reading posts sorted by "new" with a length of 10
1628767876378 | Reading post 1
1628767876590 | Reading comments from post "1", with length: undefined
1628767881214 | Reading comments from post "1", with length: undefined
1628767881306 | Trying to comment to post "1", from ip "94.134.179.229" (tkn: 1950649475980946) with content: "test<<>"
1628767882325 | Reading post 1
1628767882607 | Reading comments from post "1", with length: undefined
1628767895149 | Reading comments from post "1", with length: undefined
1628768000763 | Trying to set post "preview", as name "The first post with the MD editor!!11!!!"
1628768000765 | Contents: {"author":"Derz","content":"# Your post (NO HEADLINE HERE)","create":1628768000763,"desc":"Hi i'm a desecription plz open this article!!1!","id":-1,"rating":{"+":0,"-":0},"tags":["testing","space_Ballz","fuck_drump","MONEY","$$$"],"title":"The first post with the MD editor!!11!!!"}
1628768000814 | Reading post preview
1628768001078 | Reading comments from post "-1", with length: undefined
1628768035762 | Trying to set post "preview", as name "The first post with the MD editor!!11!!!"
1628768035763 | Contents: {"author":"Derz","content":"# Your post (NO HEADLINE HERE)","create":1628768035762,"desc":"Hi i'm a desecription plz open this article!!1!","id":-1,"rating":{"+":0,"-":0},"tags":["testing","space_Ballz","fuck_drump","MONEY","$$$"],"title":"The first post with the MD editor!!11!!!"}
1628768035808 | Reading post preview
1628768036050 | Reading comments from post "-1", with length: undefined
1628768044881 | Trying to set post "preview", as name "The first post with the MD editor!!11!!!"
1628768044882 | Contents: {"author":"Derz","content":"# Your post (NO HEADLINE HERE)","create":1628768044881,"desc":"Hi i'm a desecription plz open this article!!1!","id":-1,"rating":{"+":0,"-":0},"tags":["testing","space_Ballz","fuck_drump","MONEY","$$$"],"title":"The first post with the MD editor!!11!!!"}
1628768044924 | Reading post preview
1628768045190 | Reading comments from post "-1", with length: undefined
--- SEPERATOR ---
1628768123286 | Dumping config:
1628768123292 | {"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}
1628867892271 | Reading posts sorted by "new" with a length of 10
1628867919055 | Reading posts sorted by "new" with a length of 10
1628867925262 | Reading posts sorted by "new" with a length of 10

View File

@ -14,16 +14,10 @@ var admin = require("./admin")
// init logging
log.init( conf.logging, conf.logfile )
// general TODO:
// config! ./config.js for some configuration in js just some form stuff
// posts.rank timer config'n stuff
//
// logging levels log.log(msg, log.d.LEVEL)
// none - well none
// basic - access + creation of comments into logfile
// hacker - same same but in output
// paranoid - log everything (also shell)
const app = express()
const port = 5500
@ -260,7 +254,7 @@ app.all("/comments", (req, res) => {
"authorinfo":{
"country":geoip.lookupCountry(data),
"origin":"web"},
"body": req.body.body
"body": req.body.body.replace(/\</g, "&lt;").replace(/\>/g, "&gt;")
})
if ( ret.type == "err" ) res.status( 400 )
res.end(JSON.stringify( ret ))