Bug #69208
closed
Mail address with UTF-8 smilie validates
Added by aimcom no-lastname-given over 9 years ago.
Updated about 7 years ago.
Description
A mail address like "john.doe@☺gmail.com" will return TRUE
if passed to GeneralUtility::validEmail()
. But if I try to set it as sender or receiver it throws a Swift_RfcComplianceException
"Address in mailbox given [john.doe@☺gmail.com] does not comply with RFC 2822, 3.6.2.".
- Status changed from New to On Hold
GeneralUtility::validEmail() is actually correct as the smiley in the domain name is valid as long as it's punycode encoded. There's an open bug report/feature request regarding IDN Support for SwiftMailer: https://github.com/swiftmailer/swiftmailer/issues/63
We need to wait on SwiftMailer to fix this.
At the TYPO3camp Munich 2015, we tried to fix this bug and thought that the best solution was to extend the default methods setTo
, setFrom
etc. in \TYPO3\CMS\Core\Mail\MailMessage\
and execute a IDNA encoding like in GeneralUtility::validEmail
:
if (!preg_match('/^[a-z0-9.\\-]*$/i', $domain)) {
$domain = self::idnaEncode($domain);
}
It seems like the IDNA encoded domain could pass the validation methods of SwiftMailer.
- Status changed from On Hold to New
Unlocked after discussion held on TYPO3camp Munich 2015;
\TYPO3\CMS\Core\Mail\MailMessage
should be adapted to fix this problem
- Status changed from New to In Progress
- Assignee set to Morton Jonuschat
- Target version set to 7.5
- Sprint Focus set to On Location Sprint
- Status changed from In Progress to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43294
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43294
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43294
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43294
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Sprint Focus deleted (
On Location Sprint)
- Status changed from Resolved to Closed
Also available in: Atom
PDF