fixed error after unsigning auth cookie
now sending error message if an invalid auth cookie is passed to the server
This commit is contained in:
parent
1afa1bcc64
commit
81358f3c28
@ -164,6 +164,10 @@ router.use("/api/*",async function(req,res,next) {
|
||||
return
|
||||
}
|
||||
let unsigned = unsign(cookie,req,res)
|
||||
if(!unsigned){
|
||||
res.json({"error":"you are not logged in! (invalid cookie)"})
|
||||
return
|
||||
}
|
||||
let sql = `select * from zerotwohub.users where User_Name=? and User_PW=?;`
|
||||
let values = unsigned.split(" ")
|
||||
values[1] = SHA256(values[1],values[0],HASHES_DIFF)
|
||||
|
Loading…
x
Reference in New Issue
Block a user