From c95119156db5d586d9235ac0f36557e06a611288 Mon Sep 17 00:00:00 2001 From: Opliko Date: Sun, 30 Jul 2023 02:11:17 +0200 Subject: [PATCH] fix: register abort can error on weird session state (#11854) --- src/controllers/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index dcd9aa371f..58eff94299 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -210,7 +210,7 @@ authenticationController.registerComplete = async function (req, res) { }; authenticationController.registerAbort = async (req, res) => { - if (req.uid) { + if (req.uid && req.session.registration) { // Email is the only cancelable interstitial delete req.session.registration.updateEmail;