Project

General

Profile

Actions

Task #91123

closed

Epic #87417: Integrate proper Content Security Policy (CSP) handling

Task #87418: Refactor and remove usage of inline scripts in backend

Avoid inline JavaScript generated by BackendUtility:viewOnClick

Added by Oliver Hader about 4 years ago. Updated over 3 years ago.

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

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Inline JavaScript produced by BackendUtility:viewOnClick is substituted with markup based instructions and static JavaScript event handlers.

// basically delivers window.open(generatedUri)
BackendUtility::viewOnClick($pageId, $backPath, $rootLine, $section, $viewUri, $getVars, $switchFocus);

can be substituted with e.g.

\TYPO3\CMS\Backend\Routing\PreviewUriBuilder::create($pageId, $viewUri)
    ->withRootLine($rootLine)
    ->withSection($section)
    ->withAdditionalQueryParameters($getVars)
    ->serializeDispatcherAttributes([PreviewUriBuilder::OPTION_SWITCH_FOCUS => $switchFocus]);

which results in the following HTML data attributes
(data can be retrieved as array of complete element as well)

... data-dispatch-action="TYPO3.WindowManager.localOpen" data-dispatch-args="["...uri...",null,"previewWin"]" 

Related issues 6 (0 open6 closed)

Related to TYPO3 Core - Task #91806: Deprecate BackendUtility::viewOnClickClosedOliver Hader2020-07-16

Actions
Related to TYPO3 Core - Bug #93065: TypeError using the page moduleClosedMarkus Klein2020-12-12

Actions
Related to TYPO3 Core - Task #94667: Move a Changelog file to correct directoryClosed2021-07-29

Actions
Related to TYPO3 Core - Task #91813: Replace window.open JavaScript with WindowManagerClosed2020-07-17

Actions
Related to TYPO3 Core - Task #96141: Remove deprecated BackendUtility::viewOnClickClosedOliver Hader2021-11-29

Actions
Related to TYPO3 Core - Feature #97544: Replace hooks with events for Preview URL generationClosed2022-05-03

Actions
Actions #1

Updated by Gerrit Code Review about 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/+/64243

Actions #2

Updated by Gerrit Code Review about 4 years ago

Patch set 2 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/+/64243

Actions #3

Updated by Gerrit Code Review about 4 years ago

Patch set 3 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/+/64243

Actions #4

Updated by Gerrit Code Review about 4 years ago

Patch set 4 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/+/64243

Actions #5

Updated by Gerrit Code Review about 4 years ago

Patch set 5 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/+/64243

Actions #6

Updated by Gerrit Code Review about 4 years ago

Patch set 6 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/+/64243

Actions #7

Updated by Gerrit Code Review almost 4 years ago

Patch set 7 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/+/64243

Actions #8

Updated by Gerrit Code Review almost 4 years ago

Patch set 8 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/+/64243

Actions #9

Updated by Oliver Hader almost 4 years ago

  • Related to Task #91806: Deprecate BackendUtility::viewOnClick added
Actions #10

Updated by Gerrit Code Review almost 4 years ago

Patch set 9 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/+/64243

Actions #11

Updated by Gerrit Code Review almost 4 years ago

Patch set 10 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/+/64243

Actions #12

Updated by Gerrit Code Review almost 4 years ago

Patch set 11 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/+/64243

Actions #13

Updated by Gerrit Code Review almost 4 years ago

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

Actions #14

Updated by Gerrit Code Review almost 4 years ago

Patch set 12 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/+/64243

Actions #15

Updated by Gerrit Code Review almost 4 years ago

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

Actions #16

Updated by Gerrit Code Review over 3 years ago

Patch set 13 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/+/64243

Actions #17

Updated by Gerrit Code Review over 3 years ago

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

Actions #18

Updated by Gerrit Code Review over 3 years ago

Patch set 14 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/+/64243

Actions #19

Updated by Gerrit Code Review over 3 years ago

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

Actions #20

Updated by Gerrit Code Review over 3 years ago

Patch set 15 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/+/64243

Actions #21

Updated by Gerrit Code Review over 3 years ago

Patch set 16 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/+/64243

Actions #22

Updated by Oliver Hader over 3 years ago

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

Updated by Markus Klein over 3 years ago

  • Related to Bug #93065: TypeError using the page module added
Actions #24

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions #25

Updated by Christian Kuhn over 2 years ago

  • Related to Task #94667: Move a Changelog file to correct directory added
Actions #26

Updated by Oliver Hader over 2 years ago

  • Related to Task #91813: Replace window.open JavaScript with WindowManager added
Actions #27

Updated by Oliver Hader over 2 years ago

  • Related to Task #96141: Remove deprecated BackendUtility::viewOnClick added
Actions #28

Updated by Oliver Bartsch almost 2 years ago

  • Related to Feature #97544: Replace hooks with events for Preview URL generation added
Actions

Also available in: Atom PDF