Feature #23491 » addHTTPSEnforcement_v2.diff
typo3/sysext/cms/ext_tables.php (Arbeitskopie) | ||
---|---|---|
'default' => '0'
|
||
)
|
||
),
|
||
'urlScheme' => array (
|
||
'exclude' => 1,
|
||
'label' => 'LLL:EXT:cms/locallang_tca.xml:pages.urlScheme',
|
||
'config' => array (
|
||
'type' => 'select',
|
||
'items' => array (
|
||
array('LLL:EXT:cms/locallang_tca.xml:pages.urlScheme.I.0', '0'),
|
||
array('LLL:EXT:cms/locallang_tca.xml:pages.urlScheme.I.1', '1'),
|
||
array('LLL:EXT:cms/locallang_tca.xml:pages.urlScheme.I.2', '2')
|
||
),
|
||
'default' => '0'
|
||
)
|
||
),
|
||
'fe_group' => array (
|
||
'exclude' => 1,
|
||
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group',
|
||
... | ... | |
$TCA['pages']['palettes'] = t3lib_div::array_merge($TCA['pages']['palettes'],array(
|
||
'1' => array('showitem' => 'starttime, endtime, extendToSubpages'),
|
||
'2' => array('showitem' => 'layout, lastUpdated, newUntil, no_search'),
|
||
'3' => array('showitem' => 'alias, target, no_cache, cache_timeout'),
|
||
'3' => array('showitem' => 'alias, target, no_cache, cache_timeout, urlScheme'),
|
||
'5' => array('showitem' => 'author, author_email', 'canNotCollapse' => 1)
|
||
));
|
||
typo3/sysext/cms/locallang_tca.xml (Arbeitskopie) | ||
---|---|---|
<label index="pages.layout.I.1">Layout 1</label>
|
||
<label index="pages.layout.I.2">Layout 2</label>
|
||
<label index="pages.layout.I.3">Layout 3</label>
|
||
<label index="pages.urlScheme">URL-Scheme</label>
|
||
<label index="pages.urlScheme.I.0">stay in context</label>
|
||
<label index="pages.urlScheme.I.1">force HTTP</label>
|
||
<label index="pages.urlScheme.I.2">force HTTPS</label>
|
||
<label index="pages.extendToSubpages">Include subpages:</label>
|
||
<label index="pages.nav_title">Navigation title:</label>
|
||
<label index="pages.nav_hide">Hide in menu:</label>
|
typo3/sysext/cms/ext_tables.sql (Arbeitskopie) | ||
---|---|---|
fe_group varchar(100) DEFAULT '0' NOT NULL,
|
||
subtitle varchar(255) DEFAULT '' NOT NULL,
|
||
layout tinyint(3) unsigned DEFAULT '0' NOT NULL,
|
||
urlScheme tinyint(3) unsigned DEFAULT '0' NOT NULL,
|
||
target varchar(80) DEFAULT '' NOT NULL,
|
||
media text,
|
||
lastUpdated int(10) unsigned DEFAULT '0' NOT NULL,
|
typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie) | ||
---|---|---|
$this->pageNotFoundAndExit($pNotFoundMsg[$this->pageNotFound]);
|
||
}
|
||
if ($this->page['urlScheme'] > 0) {
|
||
$newUrl = '';
|
||
if ($this->page['urlScheme'] == 1 && substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), 0, 5) == 'https') {
|
||
$newUrl = 'http' . substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), 5);
|
||
}
|
||
if ($this->page['urlScheme'] == 2 && substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), 0, 4) == 'http') {
|
||
$newUrl = 'https' . substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), 4);
|
||
}
|
||
if ($newUrl !== '') {
|
||
t3lib_utility_http::redirect($newUrl, t3lib_utility_http::HTTP_STATUS_301);
|
||
}
|
||
}
|
||
// set no_cache if set
|
||
if ($this->page['no_cache']) {
|
||
$this->set_no_cache();
|
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie) | ||
---|---|---|
$absoluteUrlScheme = 'http';
|
||
// URL shall be absolute:
|
||
if (isset($conf['forceAbsoluteUrl']) && $conf['forceAbsoluteUrl']) {
|
||
if (isset($conf['forceAbsoluteUrl']) && $conf['forceAbsoluteUrl'] || $page['urlScheme'] > 0) {
|
||
// If no domain records are defined, use current domain:
|
||
if ($targetDomain === '') {
|
||
$targetDomain = $currentDomain;
|
||
... | ... | |
// Override scheme:
|
||
if (isset($conf['forceAbsoluteUrl.']['scheme']) && $conf['forceAbsoluteUrl.']['scheme']) {
|
||
$absoluteUrlScheme = $conf['forceAbsoluteUrl.']['scheme'];
|
||
} else if ($page['urlScheme'] > 0) {
|
||
$absoluteUrlScheme = $page['urlScheme'] == 1 ? 'http' : 'https';
|
||
}
|
||
}
|
||