Project

General

Profile

Actions

Bug #96835

closed

\TYPO3\CMS\Core\Routing\PageRouter: Default on https when scheme is not configured

Added by Benjamin Serfhos almost 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Start date:
2022-02-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:

Description

We have configured a base relative domain for allowing both http and https requests.
For example in sites/<env>/config.yaml:

base: '/'
baseVariants:
  - base: 'www.mylivedomain.com'
    condition: 'applicationContext == "Production/Live"'

This works perfectly how i intend it to work, however when generating urls using PageRouter, the fallback uses http.

When looking at the core I see both fallbacks to go to 'https' and 'http'.

public/typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php:437 > defaults to https
public/typo3/sysext/core/Classes/Routing/PageRouter.php:323 > defaults to http

When i adjust the PageRouter default to https it seems to work exactly how i want the site to work but i cannot find a good 'configuration' to set this default. So im forced with xclass or applying patches.

As the 'safe' schemeless `//` is possible as configuration in the backend, it should at least fallback to https as default.

Actions #1

Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73489

Actions #2

Updated by Georg Ringer almost 3 years ago

thanks for creating the issue. as this can be breaking for sites, I changed it for v12 only!

Actions #3

Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73489

Actions #4

Updated by Gerrit Code Review almost 3 years ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73489

Actions #5

Updated by Georg Ringer almost 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF