mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-27 15:05:38 -04:00
[user][ban] ensure no init emails get sent out to banned users
This commit is contained in:
parent
4020b0bfbf
commit
14a255812a
@ -314,6 +314,10 @@ router.post('/user/init', handleErrorAsync(async (req, res) => {
|
||||
return res.json({ error: 'user.account.changeEmail.invalid' })
|
||||
}
|
||||
|
||||
if (await lookupBanArchive(req.db, 'email', payload)) {
|
||||
throw 'banned';
|
||||
}
|
||||
|
||||
let codeKey;
|
||||
if (isTest) {
|
||||
codeKey = await saveAuthenticator(req.db, 'email', user, payload, 15);
|
||||
|
Loading…
x
Reference in New Issue
Block a user