Skip to content

Commit ba64dad

Browse files
committed
1.5.2
DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS, resolved.
1 parent dab916a commit ba64dad

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

docs/INSTALL.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
Copy the latest version of the [jsonstat-toolkit code](https://raw.githubusercontent.com/jsonstat/toolkit/master/iife.js) to your server and use a script tag in your webpage to link to it. <strong>jsonstat-toolkit</strong> is also available from several CDNs ([unpkg](https://unpkg.com), [jsDelivr](https://www.jsdelivr.com/)):
1212

1313
```html
14-
<script src="https://unpkg.com/[email protected].1"></script>
14+
<script src="https://unpkg.com/[email protected].2"></script>
1515
```
1616

1717
```html
18-
<script src="https://cdn.jsdelivr.net/npm/[email protected].1"></script>
18+
<script src="https://cdn.jsdelivr.net/npm/[email protected].2"></script>
1919
```
2020

2121
The Toolkit works on any modern browser. It also supports Internet Explorer 9 or higher as long as its connection capabilities (*JSONstat(url).then(func)*) are not used (and even older Internet Explorer versions as long as polyfills are provided for [Array.isArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray), [Object.keys](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys) and [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)). It is also possible to use the Toolkit connection capabilities on Internt Explorer as long as polyfills for [promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) and [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) are provided:
2222

2323
```html
2424
<script src="https://cdn.jsdelivr.net/combine/npm/[email protected],npm/[email protected]"></script>
25-
<script src="https://unpkg.com/[email protected].1"></script>
25+
<script src="https://unpkg.com/[email protected].2"></script>
2626
```
2727

2828
### ECMAScript module
@@ -31,13 +31,13 @@ Very modern browsers support ECMAScript modules. Copy the latest version of the
3131

3232
```html
3333
<script type="module">
34-
import JSONstat from "https://unpkg.com/[email protected].1/import.mjs";
34+
import JSONstat from "https://unpkg.com/[email protected].2/import.mjs";
3535
</script>
3636
```
3737

3838
```html
3939
<script type="module">
40-
import JSONstat from "https://cdn.jsdelivr.net/npm/[email protected].1/import.mjs";
40+
import JSONstat from "https://cdn.jsdelivr.net/npm/[email protected].2/import.mjs";
4141
</script>
4242
```
4343

@@ -72,5 +72,5 @@ import { JSONstat } from "@jsonstat/toolkit"
7272
To import a particular version of the jsonstat-toolkit in [Observable](https://observablehq.com/):
7373

7474
```js
75-
JSONstat = require("[email protected].1").catch(() => window["JSONstat"])
75+
JSONstat = require("[email protected].2").catch(() => window["JSONstat"])
7676
```

iife.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

import.mjs

+2-2
Large diffs are not rendered by default.

main.cjs

+2-2
Large diffs are not rendered by default.

module.mjs

+2-2
Large diffs are not rendered by default.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsonstat-toolkit",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"description": "JSON-stat Javascript Toolkit: a library to deal with JSON-stat responses.",
55
"homepage": "https://jsonstat.com",
66
"keywords": [
@@ -32,9 +32,9 @@
3232
"node-fetch": "^2.6.0"
3333
},
3434
"devDependencies": {
35-
"@rollup/plugin-json": "^4.0.0",
36-
"rollup": "^1.27.1",
37-
"rollup-plugin-terser": "^5.1.2"
35+
"@rollup/plugin-json": "^6.1.0",
36+
"rollup": "^4.26.0",
37+
"@rollup/plugin-terser": "^0.4.4"
3838
},
3939
"license": "Apache-2.0",
4040
"files": [

rollup.config.js renamed to rollup.config.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {terser} from "rollup-plugin-terser";
1+
import terser from "@rollup/plugin-terser";
22
import json from '@rollup/plugin-json';
3-
import * as pkg from "./package.json";
3+
import pkg from "./package.json" with {type: "json"};
44

55
const
66
preamble=`// ${pkg.name} v${pkg.version} Copyright ${(new Date).getFullYear()} ${pkg.author.name} ${pkg.homepage}`,

0 commit comments

Comments
 (0)