Added CSRF tokens to non-partial templates.

This commit is contained in:
rainbow napkin 2024-12-29 15:02:37 -05:00
parent 2ea3c72a61
commit 83f76af6e8
24 changed files with 94 additions and 22 deletions

View file

@ -269,10 +269,13 @@ userSchema.statics.authenticate = async function(user, pass){
}
userSchema.statics.findProfile = async function(user){
//Catch null users
if(user == null || user.user == null){
return null;
//If someone's looking for tokebot
if(user.user.toLowerCase() == "tokebot"){
}else if(user.user.toLowerCase() == "tokebot"){
//fake a profile hashtable for tokebot
profile = {
const profile = {
id: -420,
user: "Tokebot",
date: (await statModel.getStats()).firstLaunch,