Skip to content

Commit 9eb77e2

Browse files
committed
fix: fix security bug
1 parent 3c193d6 commit 9eb77e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
'use strict'
22

3-
const parser = require('fast-xml-parser')
3+
const { XMLParser } = require('fast-xml-parser')
44
const api = require('./api')
55

66
module.exports = function (word, opt) {
77
if (!opt) opt = {}
88

99
return api
1010
.fetchTerm(word, opt)
11-
.then(xml => parser.parse(xml))
11+
.then(xml => new XMLParser().parse(xml))
1212
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"license": "MIT",
3030
"dependencies": {
3131
"chalk": "^2.0.0",
32-
"fast-xml-parser": "^2.6.0",
32+
"fast-xml-parser": "^4.2.4",
3333
"meow": "^3.7.0",
3434
"node-fetch": "^2.6.1",
3535
"ora": "^1.3.0",

0 commit comments

Comments
 (0)