Project

General

Profile

Actions

Bug #69208

closed

Mail address with UTF-8 smilie validates

Added by aimcom no-lastname-given over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2015-08-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

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.".


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #69740: validEmail in GeneralUtility accepts special UTF8 charactersRejected2015-09-12

Actions
Actions #1

Updated by Morton Jonuschat over 8 years ago

  • 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.

Actions #2

Updated by Felix Heller over 8 years ago

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.

Actions #3

Updated by Riccardo De Contardi over 8 years ago

  • 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

Actions #4

Updated by Morton Jonuschat over 8 years ago

  • 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
Actions #5

Updated by Gerrit Code Review over 8 years ago

  • 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

Actions #6

Updated by Gerrit Code Review over 8 years ago

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

Actions #7

Updated by Gerrit Code Review over 8 years ago

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

Actions #8

Updated by Gerrit Code Review over 8 years ago

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

Actions #9

Updated by Morton Jonuschat over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Anja Leichsenring over 8 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #11

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF