Bug #80139

Tilde in base URL causes exception

Added by Aimeos no-lastname-given over 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Start date:
2017-03-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If the base URL contains a tilde (e.g. in "localhost/~test/"), an exception is thrown:

InvalidArgumentException: NAMEPREP: Prohibited input U+0000007E in typo3_src-8.6.1/vendor/mso/idna-convert/src/Punycode.php:335
Stack trace:
#0 typo3_src-8.6.1/vendor/mso/idna-convert/src/Punycode.php(187): Mso\\IdnaConvert\\Punycode->namePrep(Array)
#1 typo3_src-8.6.1/vendor/mso/idna-convert/src/IdnaConvert.php(327): Mso\\IdnaConvert\\Punycode->encode(Array)
#2 typo3_src-8.6.1/typo3/sysext/core/Classes/Utility/GeneralUtility.php (1088): Mso\\IdnaConvert\\IdnaConvert->encode(Array)
#3 typo3_src-8.6.1/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(5917): TYPO3\\CMS\\Core\\Utility\\GeneralUtility::idnaEncode('localhost/~test...')
#4 typo3_src-8.6.1/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(6232): TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer->typoLink('|', Array)
#5 typo3_src-8.6.1/typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php(705): TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer->typoLink_URL(Array)

The punnycode encoding must be used for the domain part only.


Related issues

Related to TYPO3 Core - Bug #86921: Linkvalidator reports exception on links with tilde (~)Closed2018-11-13

Actions
#1

Updated by Josef Glatz over 4 years ago

Note: I didn't use baseURL anymore. Could be the following snippet a better solution without maintaining baseURL?

config.absRefPrefix = auto
#2

Updated by Aimeos no-lastname-given over 4 years ago

Josef Glatz wrote:

Note: I didn't use baseURL anymore. Could be the following snippet a better solution without maintaining baseURL?

This is not related to config.baseurl and always occurs if the TYPO3 instance is located in a subdirectory or an Apache virtual path that contains a tilde.

#3

Updated by Benni Mack about 4 years ago

  • Target version changed from 8 LTS to Candidate for patchlevel
#4

Updated by Benni Mack over 2 years ago

  • Status changed from New to Needs Feedback

Can you recheck on TYPO3 v9 with site handling?

#5

Updated by Aimeos no-lastname-given over 2 years ago

Benni Mack wrote:

Can you recheck on TYPO3 v9 with site handling?

Seems to work in TYPO3 9.5.0

#6

Updated by Georg Ringer over 2 years ago

  • Status changed from Needs Feedback to Resolved

I am closing the issue. nothing will be changed in that regard in 9.

thanks for your feedback!

#7

Updated by Sybille Peters over 2 years ago

  • Related to Bug #86921: Linkvalidator reports exception on links with tilde (~) added
#8

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF