mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: don't confirm emails on HEAD request
outlook safelinks triggers page twice
This commit is contained in:
@@ -228,6 +228,10 @@ Controllers.confirmEmail = async (req, res) => {
|
||||
...opts,
|
||||
});
|
||||
}
|
||||
|
||||
if (req.method === 'HEAD') {
|
||||
return renderPage();
|
||||
}
|
||||
try {
|
||||
if (req.loggedIn) {
|
||||
const emailValidated = await user.getUserField(req.uid, 'email:confirmed');
|
||||
|
||||
Reference in New Issue
Block a user