Project

General

Profile

Actions

Bug #95464

closed

Invalid email address notification in BE form doesn't show correctly

Added by Robert von Hackwitz about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2021-10-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If a field in a BE form has the value "email" as configuration "eval" and an invalid email address is entered, the error message is not displayed correctly (see screenshot)
the checkValue_input_ValidateEmail method is in fact currently like this

protected function checkValue_input_ValidateEmail($value, &$set, string $table, $id)
    {

        if (GeneralUtility::validEmail($value)) {
            return;
        }

        $set = false;
        $this->log(
            $table,
            $id,
            SystemLogDatabaseAction::UPDATE,
            0,
            SystemLogErrorClassification::SECURITY_NOTICE,
            '"%s" is not a valid e-mail address.',
            -1,
            [$this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:error.invalidEmail'), $value]
        );
    }

while it should be like this

protected function checkValue_input_ValidateEmail($value, &$set, string $table, $id)
    {
        if (GeneralUtility::validEmail($value)) {
            return;
        }

        $set = false;
        $this->log(
            $table,
            $id,
            SystemLogDatabaseAction::UPDATE,
            0,
            SystemLogErrorClassification::SECURITY_NOTICE,
            $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:error.invalidEmail'),
            -1,
            [$value]
        );
    }

Files

Schermata da 2021-10-04 14-47-09.png (38 KB) Schermata da 2021-10-04 14-47-09.png Robert von Hackwitz, 2021-10-04 13:01

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #95444: DataHandler - server-side log message is rendered incorrectlyClosed2021-10-02

Actions
Actions

Also available in: Atom PDF