Skip to content

Commit

Permalink
Allowed localhost email for Ghost Mailer "from" address (#11476)
Browse files Browse the repository at this point in the history
no issue

Allow localhost mails to bypass validator email check and assign blog title as email name when missing
  • Loading branch information
rishabhgrg authored Jan 13, 2020
1 parent caabdad commit 1e5f785
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/server/services/mail/GhostMailer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function getFromAddress(requestedFromAddress) {
}

// If we do have a from address, and it's just an email
if (validator.isEmail(address)) {
if (validator.isEmail(address, {require_tld: false})) {
const defaultBlogTitle = settingsCache.get('title') ? settingsCache.get('title').replace(/"/g, '\\"') : common.i18n.t('common.mail.title', {domain: getDomain()});
return `"${defaultBlogTitle}" <${address}>`;
}
Expand Down

0 comments on commit 1e5f785

Please sign in to comment.