Project

General

Profile

Actions

Bug #95464

closed

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

Added by Robert von Hackwitz over 2 years ago. Updated over 2 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 #1

Updated by Wouter Wolters over 2 years ago

  • Status changed from New to Needs Feedback

https://forge.typo3.org/issues/95444 Looks like this is the same. Can you confirm?

Actions #2

Updated by Robert von Hackwitz over 2 years ago

Yes, confirmed.

I apologize, I had not seen https://forge.typo3.org/issues/95444

Actions #3

Updated by Georg Ringer over 2 years ago

  • Related to Bug #95444: DataHandler - server-side log message is rendered incorrectly added
Actions #4

Updated by Georg Ringer over 2 years ago

  • Status changed from Needs Feedback to Closed

closing as duplicate

Actions

Also available in: Atom PDF