Skip to content

Commit

Permalink
#9997 Add integrity check for external script (#10035)
Browse files Browse the repository at this point in the history
  • Loading branch information
offtherailz authored Mar 6, 2024
1 parent 85fdabf commit 3af61c6
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 9 deletions.
4 changes: 3 additions & 1 deletion project/standard/templates/dashboard-embedded-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
<script src="https://unpkg.com/[email protected]/es5.js"
integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
onload="checkBrowser()"></script>
<script type="text/javascript">
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
Expand Down
4 changes: 3 additions & 1 deletion project/standard/templates/embeddedTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
<script src="https://unpkg.com/[email protected]/es5.js"
integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
onload="checkBrowser()"></script>
<script type="text/javascript">
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
Expand Down
4 changes: 3 additions & 1 deletion project/standard/templates/geostory-embedded-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
<script src="https://unpkg.com/[email protected]/es5.js"
integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
onload="checkBrowser()"></script>
<script type="text/javascript">
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
Expand Down
6 changes: 4 additions & 2 deletions project/standard/templates/indexTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
<script type="text/javascript">
<script src="https://unpkg.com/[email protected]/es5.js"
integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
onload="checkBrowser()"></script>
<script type="text/javascript">
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
var isValidBrowser = browserInfo.satisfies({
Expand Down
4 changes: 3 additions & 1 deletion web/client/dashboard-embedded-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
<script src="https://unpkg.com/[email protected]/es5.js"
integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
onload="checkBrowser()"></script>
<script type="text/javascript">
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
Expand Down
4 changes: 3 additions & 1 deletion web/client/embeddedTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
<script src="https://unpkg.com/[email protected]/es5.js"
integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
onload="checkBrowser()"></script>
<script type="text/javascript">
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
Expand Down
4 changes: 3 additions & 1 deletion web/client/geostory-embedded-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
<script src="https://unpkg.com/[email protected]/es5.js"
integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
onload="checkBrowser()"></script>
<script type="text/javascript">
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
Expand Down
4 changes: 3 additions & 1 deletion web/client/indexTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" />
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/[email protected]/es5.js" onload="checkBrowser()"></script>
<script src="https://unpkg.com/[email protected]/es5.js"
integrity="sha384-CWiXbo5RNu6nv9tiCWA2y1DQKjEQDDH+yFQga1FytuIZjOTcVr+4ojw2S2lShj/d" crossorigin="anonymous"
onload="checkBrowser()"></script>
<script type="text/javascript">
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
Expand Down

0 comments on commit 3af61c6

Please sign in to comment.