mirror of
https://github.com/HeyPuter/puter.git
synced 2026-02-19 21:21:23 -06:00
fix: add missing null check
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user