Bug #78262

Missing CORS settings attribute when using integrity with includeJS

Added by Xavier Perseguers almost 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2016-10-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

TypoScript

includeJS {
    jquery = //ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js
    jquery {
        external = 1
        # integrity was computed with https://srihash.org/
        integrity = sha384-Pn+PczAsODRZ2PiGg0IheRROpP7lXO1NTIjiPo6cca8TliBvaeil42fobhzvZd74
    }
}

Generated HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" type="text/javascript" integrity="sha384-Pn+PczAsODRZ2PiGg0IheRROpP7lXO1NTIjiPo6cca8TliBvaeil42fobhzvZd74"></script>

Problem

Chrome (at least) does not load the resource and says:

Solution

Add attribute crossorigin="anonymous" when using integrity.

Documentation


Files

chrome.png (24.9 KB) chrome.png Xavier Perseguers, 2016-10-12 14:28

Related issues

Related to TYPO3 Core - Feature #76459: Add crossorigin property to JavaScript filesClosedJacob Dreesen2016-06-05

Actions
#1

Updated by Gerrit Code Review almost 5 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/50196

#2

Updated by Gerrit Code Review almost 5 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50209

#3

Updated by Xavier Perseguers almost 5 years ago

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

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF