Commit 9c9c4f3b authored by Georg Ringer's avatar Georg Ringer Committed by Andreas Fernandez
Browse files

[TASK] Add early check for validating email address

GeneralUtility::validEmail is called for all legacy link formats like
page ids. To avoid triggering Egulias\EmailValidator an early check for
the `@` sign has been added.

Resolves: #95042
Releases: master, 10.4
Change-Id: I7720a7e771d0f31f53a72e7a1a9377a9256f6014

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Stephan Großberndt's avatarStephan Großberndt <>
Tested-by: Wouter Wolters's avatarWouter Wolters <>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <>
Reviewed-by: Oliver Klee's avatarOliver Klee <>
Reviewed-by: Stephan Großberndt's avatarStephan Großberndt <>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <>
parent d3f6c5f0
......@@ -814,6 +814,9 @@ class GeneralUtility
if (trim($email) !== $email) {
return false;
if (strpos($email, '@') === false) {
return false;
$validators = [];
foreach ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['validators'] ?? [RFCValidation::class] as $className) {
$validator = new $className();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment