mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-25 19:01:56 +00:00
better error message for invalid emails
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
This commit is contained in:
@@ -81,7 +81,7 @@ router.post('/save_account', auth, express.json(), async (req, res, next)=>{
|
||||
const clean_email = svc_cleanEmail.clean(req.body.email);
|
||||
|
||||
if ( ! await svc_cleanEmail.validate(clean_email) ) {
|
||||
return res.status(400).send('This email domain is not allowed.');
|
||||
return res.status(400).send('This email does not seem to be valid.');
|
||||
}
|
||||
|
||||
const svc_edgeRateLimit = req.services.get('edge-rate-limit');
|
||||
|
||||
@@ -190,7 +190,7 @@ module.exports = eggspress(['/signup'], {
|
||||
const clean_email = svc_cleanEmail.clean(req.body.email);
|
||||
|
||||
if (clean_email !== '' && !req.body.is_temp && ! await svc_cleanEmail.validate(clean_email) ) {
|
||||
return res.status(400).send('Failed to create an account. Please try again.');
|
||||
return res.status(400).send('This email does not seem to be valid.');
|
||||
}
|
||||
|
||||
// duplicate username check
|
||||
|
||||
Reference in New Issue
Block a user