Bug #81471

Catch InvalidArgumentException thrown in \TYPO3\CMS\Core\Utility\GeneralUtility::idnaEncode

Added by Nicole Cordes over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2017-06-05
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Given:

A string with an invalid email address `“mailto:”`.

Expected:

TYPO3\CMS\Core\Utility\GeneralUtility::validEmail should return false.

Actual:

An exception `Conversion from UTF-8 to UCS-4 failed: malformed input at byte 8` is thrown.

The whole problem occurred in \TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter::resolve() during an upgrade from TYPO3 7 LTS to TYPO3 8 LTS. The link which is parsed is `<link “mailto:”></link>`. Please don't ask how this happens, I don't know. But I wouldn't expect the validEmail() function to throw an error.


Related issues

Related to TYPO3 Core - Bug #80969: List module: Content elments with additional column pi_flexform results in exception "Prohibited input U+0000000A" Closed 2017-04-23

Associated revisions

Revision dfa80ff7 (diff)
Added by Nicole Cordes over 2 years ago

[BUGFIX] Catch error in GeneralUtility::validEmail and GeneralUtility:isValidUrl

If a wrong email address or URL is parsed and the domain cannot be converted,
an exception is thrown by \Mso\IdnaConvert\IdnaConvert::encode(). This
exception needs to be caught.

Resolves: #81471
Releases: master, 8.7, 7.6
Change-Id: I76f9b8898655d9220e5176a60f388067a6c493b3
Reviewed-on: https://review.typo3.org/53121
Tested-by: TYPO3com <>
Reviewed-by: Tymoteusz Motylewski <>
Tested-by: Tymoteusz Motylewski <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

Revision 197a5b1d (diff)
Added by Nicole Cordes over 2 years ago

[BUGFIX] Catch error in GeneralUtility::validEmail and GeneralUtility:isValidUrl

If a wrong email address or URL is parsed and the domain cannot be converted,
an exception is thrown by \Mso\IdnaConvert\IdnaConvert::encode(). This
exception needs to be caught.

Resolves: #81471
Releases: master, 8.7, 7.6
Change-Id: I76f9b8898655d9220e5176a60f388067a6c493b3
Reviewed-on: https://review.typo3.org/53625
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

Revision ab2cd1fa (diff)
Added by Nicole Cordes over 2 years ago

[BUGFIX] Catch error in GeneralUtility::validEmail and GeneralUtility:isValidUrl

If a wrong email address or URL is parsed and the domain cannot be converted,
an exception is thrown by \Mso\IdnaConvert\IdnaConvert::encode(). This
exception needs to be caught.

Resolves: #81471
Releases: master, 8.7, 7.6
Change-Id: I76f9b8898655d9220e5176a60f388067a6c493b3
Reviewed-on: https://review.typo3.org/53626
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

History

#1 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New 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 https://review.typo3.org/53121

#2 Updated by Gerrit Code Review over 2 years ago

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

#3 Updated by Gerrit Code Review over 2 years ago

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

#4 Updated by Gerrit Code Review over 2 years ago

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

#5 Updated by Wolfgang Klinger over 2 years ago

  • Related to Bug #80969: List module: Content elments with additional column pi_flexform results in exception "Prohibited input U+0000000A" added

#6 Updated by Gerrit Code Review over 2 years ago

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

#7 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53625

#8 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53626

#9 Updated by Nicole Cordes over 2 years ago

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

#10 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF