Bug #86921

Linkvalidator reports exception on links with tilde (~)

Added by Sybille Peters over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2018-11-13
Due date:
% Done:

100%

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

Description

Error message: Exception: NAMEPREP: Prohibited input U+0000007E

Use a link with tilde

TYPO3 version: 9-dev (master)


Related issues

Related to TYPO3 Core - Bug #85069: Linkvalidator reports links to pages with certain cookie-alerts as brokenClosed2018-05-23

Actions
Related to TYPO3 Core - Bug #80139: Tilde in base URL causes exceptionClosed2017-03-04

Actions
#1

Updated by Sybille Peters over 2 years ago

  • Related to Bug #85069: Linkvalidator reports links to pages with certain cookie-alerts as broken added
#2

Updated by Sybille Peters over 2 years ago

  • Related to Bug #80139: Tilde in base URL causes exception added
#3

Updated by Dmitry Dulepov almost 2 years ago

Following the discussion with idna_convert guys, it is linkvalidator, who calls a wrong method. Here is a patch:

--- a/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
+++ b/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
@@ -209,7 +209,7 @@
     protected function preprocessUrl(string $url): string
     {
         try {
-            return (new IdnaConvert())->encode($url);
+            return (new IdnaConvert())->encodeUri($url);
         } catch (\Exception $e) {
             // in case of any error, return empty url.
             $this->errorParams['errorType'] = 'exception';
#4

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

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

#5

Updated by Dmitry Dulepov almost 2 years ago

The fix is contributed by the University of Basel.

#6

Updated by Gerrit Code Review almost 2 years ago

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

#7

Updated by Gerrit Code Review almost 2 years ago

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

#8

Updated by Gerrit Code Review almost 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/c/Packages/TYPO3.CMS/+/61592

#9

Updated by Dmitry Dulepov almost 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