Project

General

Profile

Actions

Bug #90933

closed

AssetCollector does not allow protocol-relative URLs

Added by Jonas Eberle over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2020-04-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
AssetCollector
Complexity:
Is Regression:
Sprint Focus:

Description

In PageRenderer, this


page.includeJSFooter.gmaps = //maps.googleapis.com/maps/api/js
page.includeJSFooter.gmaps.external = 1

would be output as expected.

In AssetCollector, this

<f:asset.script identifier="gmaps" src="//maps.googleapis.com/maps/api/js" />

would lead to TYPO3 trying to build a local URL.

IMHO it could either be documented as unsupported (because hardly needed nowadays) or hardened a bit in this part:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Page/AssetRenderer.php#L93

Protocol-relative:
https://en.wikipedia.org/wiki/URL#prurl

Rather unneeded:
https://stackoverflow.com/questions/28446314/why-use-protocol-relative-urls-at-all

Actions #1

Updated by Georg Ringer over 4 years ago

I would go for not allowing that and throw exception

Actions #2

Updated by Benni Mack over 4 years ago

I recommend allowing this and documenting this properly.

Actions #3

Updated by Christian Eßl over 4 years ago

Although I wouldn't recommend using protocol-relative urls, they are still a viable way to include urls in a html document, so I would support them.

Actions #4

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

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

Actions #5

Updated by Christian Eßl over 4 years ago

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

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF