Explorar o código

refactor: small change in addition to latest fix to make it more secure

Kristian Vos %!s(int64=5) %!d(string=hai) anos
pai
achega
6a07dd5c05
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      backend/logic/app.js

+ 1 - 0
backend/logic/app.js

@@ -129,6 +129,7 @@ module.exports = class extends coreClass {
 								}
 							], next);
 						}
+						if (!body.id) return next("Something went wrong, no id.");
 						db.models.user.findOne({'services.github.id': body.id}, (err, user) => {
 							next(err, user, body);
 						});