Project

General

Profile

Actions

Bug #57749

closed

typolink(): Incorrect generation for cross-protocol link when port is set in Host Header

Added by Anno v. Heimburg over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2014-04-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

Description

Situation:

  1. TYPO3 runs behind a proxy, that proxy sets an explicit :80 for HTTP and :443 for HTTPS traffic in the Host-Header. The Host-Header thus looks like this: Host: mydomain.com:80
  2. Links to HTTPS-only pages are present on HTTP-Pages

Expected result:
Links to the HTTPS-Pages are generated correcty, i.e. https://mydomain.com/secure/page

Actual result:
Links to the HTTPS-Pages incorrectly contain the HTTP port and thus do not work, i.e. https://mydomain.com:80/secure/page

Reason:
The logic when generating a link (typolink-function) goes like this:

  1. Check targetDomain of link. If targetDomain is identical to current domain (this is the case), set targetDomain to ""
  2. Check whether an HTTPS-link is desired.
  3. If HTTPS is desired AND targetDomain is blank (which now is the case), set the targetDomain to the contents of the Host-Header (which, in this case, includes :80)
  4. Prepend targetDomain to generated link

And thus, the link gets an incorrect port. In my opinion, in step1, targetDomain should only be set to "" if target domain AND protocol are the same as current domain and protocol, as "" seems to indicate no change.

Actions #1

Updated by Riccardo De Contardi over 8 years ago

  • Category set to Content Rendering
Actions #2

Updated by Susanne Moog about 7 years ago

  • Category changed from Content Rendering to Site Handling, Site Sets & Routing
Actions #3

Updated by Susanne Moog about 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Susanne Moog about 6 years ago

  • Status changed from New to Needs Feedback

With site handling there were some changes in this area, is this still reproducible?

Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Needs Feedback to Closed

no feedback, so I will close this ticket now. If you feel different, please let me know and we'll reopen the ticket.

Actions

Also available in: Atom PDF