0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Fixed handling of invalid tokens when changing email

no-issue

Without a return after ending the response, the code will continue to
attempt to send emails and then send another response which results in
an uncaught error.
This commit is contained in:
Fabien O'Carroll 2021-09-23 11:12:23 +02:00
parent 9031602406
commit e93d092766

View file

@ -41,7 +41,7 @@ module.exports = class MemberController {
tokenData.oldEmail = member.get('email');
} catch (err) {
res.writeHead(401);
res.end('Unauthorized.');
return res.end('Unauthorized.');
}
try {