Project

General

Profile

Actions

Bug #24642

closed

pages with Enforce Protocol(SSL) generate false URL

Added by Michel MAIER over 13 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-01-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I installed typo3 4.5 in an alias of my domain name (Not directly at the root of my domain name) :
http://www.domain-name.com/alias/
When I set https in the Enforce Protocol select list typo3 generate a bad link.
Example with typolink :
page.11 = TEXT
page.11.value = TEst
page.11.typolink{
parameter=9
}

Typo3 generate :
https://www.domain-name.com/index.php?id=9
instead of :
https://www.domain-name.com/alias/index.php?id=9

(issue imported from #M17118)


Files

17118_v1.diff (596 Bytes) 17118_v1.diff Administrator Admin, 2011-01-22 15:42
17118_4-4_v1.diff (594 Bytes) 17118_4-4_v1.diff Administrator Admin, 2011-01-22 15:52
17118_JvH.patch (1.13 KB) 17118_JvH.patch Administrator Admin, 2011-01-23 16:37
17118_JvH_v2.patch (1.14 KB) 17118_JvH_v2.patch Administrator Admin, 2011-02-09 20:27
17118_RS_v1.patch (901 Bytes) 17118_RS_v1.patch Administrator Admin, 2011-02-09 21:41

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #25366: cross domain links to pages with different protocol point to wrong (current) domainClosed2011-03-21

Actions
Has duplicate TYPO3 Core - Bug #24109: Links don't prepend possible subdir of installationClosedSusanne Moog2010-11-17

Actions
Actions #1

Updated by Steffen Gebert over 13 years ago

Does this also occur in 4.4?

Actions #2

Updated by Michel MAIER over 13 years ago

I think it's a new feature of typo3 core, in 4.4 it's necessary to install a specific extension like dmc_https.

Actions #3

Updated by Steffen Gebert over 13 years ago

kk

Actions #4

Updated by Jigal van Hemert over 13 years ago

17118_JvH.patch is a patch for trunk which tries to use the correct path if config.absRefPrefix is not set.
absRefPrefix could be used in this case to have absolute URLs to the right directory, but it would indeed be nice if it would work without further configuration.

Actions #5

Updated by Michel MAIER over 13 years ago

I tried the patch, it's work... but the '/' after the alias is doubled like that
https://www.domain-name.com/alias//index.php?id=9

Actions #6

Updated by Michel MAIER over 13 years ago

I noted an other problem, when I am on an https page, all links become relatives.
Set config.baseURL to https://www.domain-name.com/alias/ isn't a solution because all not enforced links become https..

Actions #7

Updated by Ernesto Baschny over 13 years ago

Any solution in sight, Susanne? Does Jigal's fix work for you?

Actions #8

Updated by Ernesto Baschny about 13 years ago

Is this an issue still? if so, please consider reviewing the proposed solutions and ultimately get it into the core list for reviews. So that we can have that fixed in 4.5.x sometime.

Thanks!

Actions #9

Updated by Steffen Gebert about 13 years ago

I think there's no working solution, yet.

Actions #10

Updated by Steffen Ritter about 13 years ago

Hello Michael,
thanks Ernesto for pointing me out to this one with your open Todo list.
As I implemented this feature, I will take care :)

First, I think, all links are relative by default if absolute is not forced, and the domain is not changed. Therefore your (Michael, 24.11.) seems not to be a bug to me.

As I just enhanced the "linkAcrossDomain" feature a little bit, I think, this is a bug, even without https when linking across domains.

I will inform you about my investigations. So far I cannot tell, as I had not had a deeper look at it.

Actions #11

Updated by Jigal van Hemert about 13 years ago

17118_JvH_V2.patch is against current trunk and fixes the trailing slash.

The relative URLs are correct; there are three options for the option 'Use protocol':
- Default: keep current protocol
- http:// : force http
- https:// : force https

When I set https:// for a page links to that page are absolute with https protocol. All links to other pages with 'Default' are relative, because they will use the current protocol. On that same page a link to a page with protocol http:// is absolute and forces the http:// protocol.

AFAIK can tell this is intended behaviour and the patch fixes the problem with the directories in the path.

Actions #12

Updated by Steffen Ritter about 13 years ago

attached patch is on core list..

@Michel Maier, if you mind to vote if this works for you, we could go ahead

Actions #13

Updated by Klaus Storch about 13 years ago

Hello Steffen (Ritter),

I had some problems with the related bug about cross domain- and cross protocol-links. Honestly I didn't actually try your patch - but from looking at it, I'm rather sure your patch will break cross domain links. Before setting $targetDomain to $currentDomain, you need to check wether it's a cross domain link.

Actions #14

Updated by Oliver Hader over 12 years ago

  • Target version changed from 4.5.1 to 4.5.6
Actions #15

Updated by Christian Ludwig over 12 years ago

Hi Jigal and Steffen,

In the notice 11 is described that the setting "Default" will keep the protocol.
Great would be a TS Config parameter that would control the ‘Default’ so you don't have e.g. to set every page except one to http:

Simply changing config.baseURL or config.absRefPrefix to http:... does not help because several browsers will show a warning that some content (like images javascript, ...) is delivered insecure.

So I would expect that ‘Default’ switches the protocol to a default setting that is set to http by default and that could be changed by TS. A setting that leaves the protocol as is seems bootless to me, but if there is any need for it, a fourth option should be added.

Actions #16

Updated by Chris topher over 12 years ago

  • Target version changed from 4.5.6 to 4.5.8
Actions #17

Updated by Ernesto Baschny over 12 years ago

  • Target version changed from 4.5.8 to 4.5.12
Actions #18

Updated by Steffen Ritter about 12 years ago

  • Status changed from Accepted to Needs Feedback

I think this does not apply anymore due to the recent fixes?
Could you please give feedback on that?

Actions #19

Updated by Navi about 12 years ago

Yes the feature of setting a default protocol is still very much needed.

Actions #20

Updated by Christian Ludwig about 12 years ago

Yes, a default like in notice 15 is strongly needed. Thanks.

Actions #21

Updated by Alexander Opitz over 10 years ago

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #22

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Steffen Ritter)
  • Target version deleted (4.5.12)
  • Is Regression set to No

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF