Project

General

Profile

Actions

Bug #101776

closed

GeneralUtility::validEmail() returns not corect Value if spaces in the emailstring

Added by Heiko Dietrich 9 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
-
Target version:
Start date:
2023-08-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
validators
Complexity:
easy
Is Regression:
Sprint Focus:

Description

For Example GeneralUtility::validEmail('test @testmail.com') return true, but is not e correct email! There are one space in the emailstring

Actions #1

Updated by Heiko Dietrich 9 months ago

For Example

GeneralUtility::validEmail('test @testmail.com');

return true, but is not a correct email! There are one space in the emailstring

Actions #2

Updated by Heiko Dietrich 8 months ago

The error seems to occur only with spaces before the @-character:

GeneralUtility::validEmail() return true for:

test @testmail.com

but GeneralUtility::validEmail() return false for:

test@ testmail.com
test@test mail.com
te st@testmail.com

Actions #3

Updated by Thomas Hohn 8 months ago

  • Assignee set to Thomas Hohn
Actions #4

Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #5

Updated by Gerrit Code Review 8 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #6

Updated by Heiko Dietrich 8 months ago

Please also look at this site and consider the infos:

https://ladedu.com/can-an-email-address-have-a-space-whitespace/

"ex\ ample\ "@ladedu.com 

on site is writing this is a correct email!!!
Actions #7

Updated by Gerrit Code Review 8 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #8

Updated by Heiko Dietrich 8 months ago

Is possible to use php-function filter_var?

$email = '"yes\ spaces\ are\ fine"@example.org';
$ret = filter_var($email, FILTER_VALIDATE_EMAIL);
Actions #9

Updated by Gerrit Code Review 8 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #10

Updated by Gerrit Code Review 8 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #11

Updated by Gerrit Code Review 8 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #12

Updated by Gerrit Code Review 8 months ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #13

Updated by Gerrit Code Review 8 months ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #14

Updated by Gerrit Code Review 8 months ago

Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #15

Updated by Gerrit Code Review 8 months ago

Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #16

Updated by Gerrit Code Review 8 months ago

Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #17

Updated by Gerrit Code Review 8 months ago

Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #18

Updated by Gerrit Code Review 8 months ago

Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #19

Updated by Gerrit Code Review 7 months ago

Patch set 14 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #20

Updated by Gerrit Code Review 5 months ago

Patch set 15 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80748

Actions #21

Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82116

Actions #22

Updated by Anonymous 5 months ago

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

Also available in: Atom PDF