Skip to content

Commit

Permalink
[TASK] version 0.8.6
Browse files Browse the repository at this point in the history
[TASK] resolveExtFilePathToWebUrl allow full URLs
[BUGFIX] BE output of shortcutIcon relativ instead of absolute cause on multidomain installations CSP blocks it
  • Loading branch information
Teisi committed Oct 2, 2024
1 parent a4c4f05 commit 7d87ba9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Classes/Backend/PageLayoutHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ public function resolveExtFilePathToWebUrl(string $filePath): string {
$shortcutIconPublicUrl = '';

if(!empty($filePath)) {
if (strpos($filePath, 'EXT:') === 0) {
if(filter_var($filePath, FILTER_VALIDATE_URL)) {
$shortcutIconPublicUrl = trim($filePath);
}

if(str_starts_with($filePath, 'EXT:')) {
$absPathName = GeneralUtility::getFileAbsFileName($filePath);
$shortcutIconPublicUrl = str_replace(\TYPO3\CMS\Core\Core\Environment::getPublicPath().'/', '', $absPathName);
}
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Backend/Header.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<span class="favicon">
<f:if condition="{shortcutIcon}">
<f:then>
<img src="{previewUri.scheme}://{previewUri.host}{shortcutIcon}" alt="Favicon is missing!" />
<img src="{shortcutIcon}" alt="Favicon is missing!" />
</f:then>
<f:else>
Favicon is missing!
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"url": "https://www.paypal.com/paypalme/hauerheinrich"
}
],
"version": "0.8.5",
"version": "0.8.6",
"license": ["GPL-2.0-or-later"],
"keywords": ["TYPO3 CMS", "SEO", "Extension"],
"replace": {
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'uploadfolder' => '0',
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '0.8.5',
'version' => '0.8.6',
'constraints' => [
'depends' => [
'typo3' => '12.4.0-12.4.99',
Expand Down

0 comments on commit 7d87ba9

Please sign in to comment.