Project

General

Profile

Actions

Bug #22066

closed

Multiple domain on the same page enable crossdomain linking wrongly in typolink

Added by Romain Leleu about 14 years ago. Updated over 10 years ago.

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

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello,

In my setup I've multiple domain on the same page.:
dev.xxxxxx.com
preprod.xxxxxx.com
www.xxxxxx.com

When creating a typolink it use the first listed domain. So going on the website with www.xxxxx.com while having dev.xxxx.com as the first domain will enable cross domain linking.

Of course I could change order but in some situation it's not possible. for example if a website must be reachable at the same time from internal and external adress like: site.local.lan and site.demo.mycompany.com

It seems that the bug come from typolink function in tslib_content.php. Starting from 4.3.0 code changed a lot.

In 4.3.1, on line 6075 I replaced:
if (!isset($foundDomains[$row['pid']])) {

by
if (!isset($foundDomains[$row['pid']]) || $row['domainName'] == $currentDomain) {

This way, if more than one domain is available on the same page, the current domain name will be prefered.
BE admin are still able to user the "force" field on a domain to force it.
(issue imported from #M13437)

Actions #1

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions

Also available in: Atom PDF