add check for completely invalid reply ids
This commit is contained in:
parent
32ba1a24a0
commit
2db1f8ec64
@ -482,8 +482,8 @@ router.post("/api/post", async function(req,res) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let reply_id
|
let reply_id
|
||||||
if(!req.body.reply_id) {
|
if(!req.body.reply_id || req.body.reply_id < 0) {
|
||||||
reply_id = -1
|
reply_id = 0
|
||||||
} else {
|
} else {
|
||||||
reply_id = req.body.reply_id
|
reply_id = req.body.reply_id
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user