Clarify error message further
This commit is contained in:
@@ -661,7 +661,7 @@ async function sendPasswordResetByIdentifier(identifier, auditSource) {
|
||||
|
||||
// security measure to prevent a mail manager or admin resetting the superadmin's password
|
||||
const mailDomains = await mail.listDomains();
|
||||
if (mailDomains.some(d => d.enabled && email.endsWith(`@${d.domain}`))) throw new BoxError(BoxError.CONFLICT, 'Password reset email cannot be sent to email addresses hosted on Cloudron');
|
||||
if (mailDomains.some(d => d.enabled && email.endsWith(`@${d.domain}`))) throw new BoxError(BoxError.CONFLICT, 'Password reset email cannot be sent to email addresses hosted on the same Cloudron');
|
||||
|
||||
const resetLink = await getPasswordResetLink(user, auditSource);
|
||||
await mailer.passwordReset(user, email, resetLink);
|
||||
@@ -677,7 +677,7 @@ async function sendPasswordResetEmail(user, email, auditSource) {
|
||||
|
||||
// security measure to prevent a mail manager or admin resetting the superadmin's password
|
||||
const mailDomains = await mail.listDomains();
|
||||
if (mailDomains.some(d => d.enabled && email.endsWith(`@${d.domain}`))) throw new BoxError(BoxError.CONFLICT, 'Password reset email cannot be sent to email addresses hosted on Cloudron');
|
||||
if (mailDomains.some(d => d.enabled && email.endsWith(`@${d.domain}`))) throw new BoxError(BoxError.CONFLICT, 'Password reset email cannot be sent to email addresses hosted on the same Cloudron');
|
||||
|
||||
const resetLink = await getPasswordResetLink(user, auditSource);
|
||||
await mailer.passwordReset(user, email, resetLink);
|
||||
|
||||
Reference in New Issue
Block a user