We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 988039e commit 955b087Copy full SHA for 955b087
src/backend/src/routers/signup.js
@@ -145,6 +145,14 @@ module.exports = eggspress(['/signup'], {
145
146
const svc_cleanEmail = req.services.get('clean-email');
147
const clean_email = svc_cleanEmail.clean(req.body.email);
148
+
149
+ if ( config.blocked_email_domains ) {
150
+ for ( const suffix of config.blocked_email_domains ) {
151
+ if ( clean_email.endsWith(suffix) ) {
152
+ return res.status(400).send('Please enter a valid email address.');
153
+ }
154
155
156
157
// duplicate username check
158
if(await username_exists(req.body.username))
0 commit comments