DavidBruchmann / typo3_forum

An Extbase-based TYPO3 Extension which is called typo3_forum. This fork is working in TYPO3 Version 8 and under development. Testing, Issue-reports and Pull-requests are welcome!
https://www.tukani.de
GNU General Public License v2.0
2 stars 2 forks source link

Remove hard-coded http:// method from BasicParserService #60

Open schams-net opened 5 years ago

schams-net commented 5 years ago

I stumbled across method BasicParserService::makeWebFtpClickable(), which contains http:// hard-coded. I don't know if and where this is used, but it would make sense to correct this, because it breaks on sites with https:// (and no redirect from http → https).

File: Classes/TextParser/Service/BasicParserService.php.

DavidBruchmann commented 5 years ago

The method must be malfunctioning too - if used at all:


        $dest = $matches[2];
        $dest = 'http://' . $dest;

        if (empty($dest)) {

The last line above won't be triggered ever as above is the string http:// assigned - no matter about the content of $dest.

DavidBruchmann commented 5 years ago

The function is triggered by regUrls() in the same class, so it's always called.
Question is if the whole URL-handling is required like this, or if it would be better to use core-functionality for it.