Added CSRF tokens to non-partial templates.
This commit is contained in:
parent
2ea3c72a61
commit
83f76af6e8
24 changed files with 94 additions and 22 deletions
|
|
@ -16,9 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
|||
|
||||
//Config
|
||||
const config = require('../../config.json');
|
||||
|
||||
//Local Imports
|
||||
const {userModel} = require('../schemas/user/userSchema');
|
||||
const permissionModel = require('../schemas/permissionSchema');
|
||||
const channelModel = require('../schemas/channel/channelSchema');
|
||||
const csrfUtils = require('../utils/csrfUtils');
|
||||
const {exceptionHandler, errorHandler} = require("../utils/loggerUtils");
|
||||
|
||||
//register page functions
|
||||
|
|
@ -41,7 +44,8 @@ module.exports.get = async function(req, res){
|
|||
rankEnum: permissionModel.rankEnum,
|
||||
chanGuide: chanGuide,
|
||||
userList: userList,
|
||||
permList: permList
|
||||
permList: permList,
|
||||
csrfToken: csrfUtils.generateToken(req)
|
||||
});
|
||||
|
||||
}catch(err){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue