Closed
Bug 1305803
Opened 10 years ago
Closed 10 years ago
Use SRI script tags on all Clappr includes
Categories
(Webtools Graveyard :: Air Mozilla, defect)
Webtools Graveyard
Air Mozilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: peterbe, Unassigned)
Details
At the moment we use Clappr like this::
<script type="text/javascript" src="//cdn.jsdelivr.net/clappr/latest/clappr.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/clappr.level-selector/latest/level-selector.min.js"></script>
Since it's on cdn.jsdelivr.net we should be able to find URLs to use that pin a specific version and when you pin to a specific version you can include an SRI tag that they have provided.
That means that hackers wouldn't be able to replace the clappr.min.js with a rogue version that does rogue things because the browser wouldn't recognize the hash.
| Reporter | ||
Comment 1•10 years ago
|
||
The latest of these are 0.2.63 and 0.1.10 respectively.
If we can simply switch to...:
<script src="https://cdn.jsdelivr.net/clappr/0.2.63/clappr.min.js" integrity="sha256-LEEupyM6mNli4rGm5WrT075bWNAcPrPdlqRfaEeQvBg=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/clappr.level-selector/0.1.10/level-selector.min.js" integrity="sha256-I6cVptijWSH4wC6rGak7bJxCJx7PzL3gAFR2lZ4u3/k=" crossorigin="anonymous"></script>
| Reporter | ||
Comment 2•10 years ago
|
||
The way I generate these script tags is...
1) Go to http://www.jsdelivr.com/
2) Find clappr.js
3) Click to add to collection
4) Find clappr.level-selector
5) Click to add to collection
6) Click the "2 in collection" button near the top
7) Select the "Enable SRI" checkbox
8) Copy and pasta
| Reporter | ||
Comment 3•10 years ago
|
||
Don't use the "Group links" options. Even though it's nice to have fewer requests the benefit is negligible and then you can't click the "Enable SRI" option.
Richard, would you mind implementing this on the prod template?
Flags: needinfo?(richard)
Comment 4•10 years ago
|
||
Done.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(richard)
Resolution: --- → FIXED
Updated•5 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•