Skip to content

Commit 40931b7

Browse files
authored
Merge pull request blueimp#3517 from edent/SRI
[Security] Add SRI to external JavaScript
2 parents a356654 + 92921ef commit 40931b7

File tree

7 files changed

+30
-30
lines changed

7 files changed

+30
-30
lines changed

angularjs.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,18 @@ <h3 class="title"></h3>
177177
<a class="play-pause"></a>
178178
<ol class="indicator"></ol>
179179
</div>
180-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
181-
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
180+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
181+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js" integrity="sha384-r6jjWwxAypHaESwS5an5J9dkfzwQuKVNV9FZM9B6fnt8PFuY0cVwLhV7BltCZhLy" crossorigin="anonymous"></script>
182182
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
183183
<script src="js/vendor/jquery.ui.widget.js"></script>
184184
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
185-
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
185+
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js" integrity="sha384-klGuZWTnqB7v2Zy+LDefVRiFX90fVhu5XSs58OioYvF7nGVV4VP91dbUr5e5u4np" crossorigin="anonymous"></script>
186186
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
187-
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
187+
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js" integrity="sha384-Ruiok12tfp1D6SJw02NyOhoEKZ1oyXvy4/0YfF+K459YJA31h93bS+iOszDHXd8w" crossorigin="anonymous"></script>
188188
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
189-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
189+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
190190
<!-- blueimp Gallery script -->
191-
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
191+
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js" integrity="sha384-dCF25SRAwEga8+EATJhluXfC+zve4mtBr9kaZ6rlp0xYbi9zR8PzN29hje8I9L9t" crossorigin="anonymous"></script>
192192
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
193193
<script src="js/jquery.iframe-transport.js"></script>
194194
<!-- The basic File Upload plugin -->

basic-plus.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ <h3 class="panel-title">Demo Notes</h3>
9696
</div>
9797
</div>
9898
</div>
99-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
99+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
100100
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
101101
<script src="js/vendor/jquery.ui.widget.js"></script>
102102
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
103-
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
103+
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js" integrity="sha384-klGuZWTnqB7v2Zy+LDefVRiFX90fVhu5XSs58OioYvF7nGVV4VP91dbUr5e5u4np" crossorigin="anonymous"></script>
104104
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
105-
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
105+
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js" integrity="sha384-Ruiok12tfp1D6SJw02NyOhoEKZ1oyXvy4/0YfF+K459YJA31h93bS+iOszDHXd8w" crossorigin="anonymous"></script>
106106
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
107-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
107+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
108108
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
109109
<script src="js/jquery.iframe-transport.js"></script>
110110
<!-- The basic File Upload plugin -->

basic.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ <h3 class="panel-title">Demo Notes</h3>
9696
</div>
9797
</div>
9898
</div>
99-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
99+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
100100
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
101101
<script src="js/vendor/jquery.ui.widget.js"></script>
102102
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
103103
<script src="js/jquery.iframe-transport.js"></script>
104104
<!-- The basic File Upload plugin -->
105105
<script src="js/jquery.fileupload.js"></script>
106106
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
107-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
107+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
108108
<script>
109109
/*jslint unparam: true */
110110
/*global window, $ */

cors/postmessage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<head>
1616
<meta charset="utf-8">
1717
<title>jQuery File Upload Plugin postMessage API</title>
18-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
18+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
1919
</head>
2020
<body>
2121
<script>

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,19 @@ <h3 class="title"></h3>
216216
</tr>
217217
{% } %}
218218
</script>
219-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
219+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
220220
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
221221
<script src="js/vendor/jquery.ui.widget.js"></script>
222222
<!-- The Templates plugin is included to render the upload/download listings -->
223-
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
223+
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js" integrity="sha384-9RnDvEg3yE0DwTGAY34Gze15jSzmr6XlrL5t/fzE2+qNe93kv6fyr3BOAsJIu8yL" crossorigin="anonymous"></script>
224224
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
225-
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
225+
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js" integrity="sha384-klGuZWTnqB7v2Zy+LDefVRiFX90fVhu5XSs58OioYvF7nGVV4VP91dbUr5e5u4np" crossorigin="anonymous"></script>
226226
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
227-
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
227+
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js" integrity="sha384-Ruiok12tfp1D6SJw02NyOhoEKZ1oyXvy4/0YfF+K459YJA31h93bS+iOszDHXd8w" crossorigin="anonymous"></script>
228228
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
229-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
229+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
230230
<!-- blueimp Gallery script -->
231-
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
231+
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js" integrity="sha384-dCF25SRAwEga8+EATJhluXfC+zve4mtBr9kaZ6rlp0xYbi9zR8PzN29hje8I9L9t" crossorigin="anonymous"></script>
232232
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
233233
<script src="js/jquery.iframe-transport.js"></script>
234234
<!-- The basic File Upload plugin -->

jquery-ui.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,16 @@ <h3 class="title"></h3>
201201
</tr>
202202
{% } %}
203203
</script>
204-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
205-
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
204+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
205+
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" integrity="sha384-Dziy8F2VlJQLMShA6FHWNul/veM9bCkRUaLqr199K94ntO5QUrLJBEbYegdSkkqX" crossorigin="anonymous"></script>
206206
<!-- The Templates plugin is included to render the upload/download listings -->
207-
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
207+
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js" integrity="sha384-9RnDvEg3yE0DwTGAY34Gze15jSzmr6XlrL5t/fzE2+qNe93kv6fyr3BOAsJIu8yL" crossorigin="anonymous"></script>
208208
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
209-
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
209+
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js" integrity="sha384-klGuZWTnqB7v2Zy+LDefVRiFX90fVhu5XSs58OioYvF7nGVV4VP91dbUr5e5u4np" crossorigin="anonymous"></script>
210210
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
211-
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
211+
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js" integrity="sha384-Ruiok12tfp1D6SJw02NyOhoEKZ1oyXvy4/0YfF+K459YJA31h93bS+iOszDHXd8w" crossorigin="anonymous"></script>
212212
<!-- blueimp Gallery script -->
213-
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
213+
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js" integrity="sha384-dCF25SRAwEga8+EATJhluXfC+zve4mtBr9kaZ6rlp0xYbi9zR8PzN29hje8I9L9t" crossorigin="anonymous"></script>
214214
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
215215
<script src="js/jquery.iframe-transport.js"></script>
216216
<!-- The basic File Upload plugin -->

test/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ <h2 id="qunit-userAgent"></h2>
145145
</tr>
146146
{% } %}
147147
</script>
148-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
148+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
149149
<script src="../js/vendor/jquery.ui.widget.js"></script>
150-
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
151-
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
152-
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
150+
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js" integrity="sha384-9RnDvEg3yE0DwTGAY34Gze15jSzmr6XlrL5t/fzE2+qNe93kv6fyr3BOAsJIu8yL" crossorigin="anonymous"></script>
151+
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js" integrity="sha384-klGuZWTnqB7v2Zy+LDefVRiFX90fVhu5XSs58OioYvF7nGVV4VP91dbUr5e5u4np" crossorigin="anonymous"></script>
152+
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js" integrity="sha384-Ruiok12tfp1D6SJw02NyOhoEKZ1oyXvy4/0YfF+K459YJA31h93bS+iOszDHXd8w" crossorigin="anonymous"></script>
153153
<script src="../js/jquery.iframe-transport.js"></script>
154154
<script src="../js/jquery.fileupload.js"></script>
155155
<script>
@@ -166,7 +166,7 @@ <h2 id="qunit-userAgent"></h2>
166166
/* global window, $ */
167167
window.testUIWidget = $.blueimp.fileupload;
168168
</script>
169-
<script src="https://code.jquery.com/qunit/qunit-1.23.1.js"></script>
169+
<script src="https://code.jquery.com/qunit/qunit-1.23.1.js" integrity="sha384-FJbPWND3tHbuhP8PhCp3Kn0bEtCxaIq+sfkmiJ+Su0jchKFnVbPQTTyPiuwqbkXa" crossorigin="anonymous"></script>
170170
<script src="test.js"></script>
171171
</body>
172172
</html>

0 commit comments

Comments
 (0)