Bug #16395

There is a error in detecting the ssl page

Added by Oliver Vogel almost 16 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-07-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

if you set $TYPO3_CONF_VARS['BE']['lockSSL'] = '2'; at a server hostet by 1&1 or Schlund und Partner (the biggest provider in Germany) you run into the problem, that you can NEVER log in to the backend.

The problem is, that typo3 will not detect the ssl connection. so typo3 thinks, it is not in ssl-mode and so typo3 tries to redirect to the ssl mode. this goes endless. Means the page is reloaded, reloaded, reloaded and so on. The systems hangs in this endles loop.

This is, because the server from 1&1 and Schlund und Partner sets the variable
$_SERVER['HTTPS'] to "1" and NOT to "on" like the typo3 script expected.

So the solution for me is to change the line 3099 of t3lib_div.php from

$retVal = $_SERVER['SSL_SESSION_ID'] || !strcmp($_SERVER['HTTPS'],'on') ? TRUE : FALSE;

to

$retVal = $_SERVER['SSL_SESSION_ID'] || !strcmp($_SERVER['HTTPS'],'1') ? TRUE : FALSE;

this means, i have to change "on" to "1".

After this changing, the system works fine for 1&1 and for Schlund und Partner.
(issue imported from #M3909)


Files

bug_3909.diff (633 Bytes) bug_3909.diff Administrator Admin, 2006-08-23 14:40

Related issues

Related to TYPO3 Core - Bug #14210: SSL - SSL Lock HTTPS Proxy ...ClosedChristian Jul Jensen2004-06-17

Actions
Related to TYPO3 Core - Bug #29693: Respect HTTP_X_FORWARDED_PROTO in SSL checkRejectedMichael Stucki2011-09-12

Actions
#1

Updated by Benni Mack almost 16 years ago

to keep it consistent with Typo3 (and so people can put it in CVS) the code should be:

$retVal = $_SERVER['SSL_SESSION_ID'] || !strcmp($_SERVER['HTTPS'],'1') || !strcmp($_SERVER['HTTPS'],'on') ? TRUE : FALSE;

devs - would be awesome if you could correct this.

#2

Updated by Michael Stucki almost 16 years ago

Fixed in TYPO3 4.0.2 and later.

Also available in: Atom PDF