fix: add missing null check

This commit is contained in:
KernelDeimos
2025-04-24 15:22:43 -04:00
parent b7efa6f894
commit 89b8c8de1d

View File

@@ -94,6 +94,11 @@ class AntiCSRFService extends BaseService {
if ( ! subdomain_check ) {
return res.status(404).send('Hey, stop that!');
}
if ( ! req.user ) {
res.status(403).send({});
return;
}
// TODO: session uuid instead of user
const token = this.create_token(req.user.uuid);