Skip to content

Commit 964819b

Browse files
authored
fix: security issue with xmldom <= 0.6.0 (#3619)
1 parent 33e2405 commit 964819b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"@cucumber/cucumber-expressions": "^16",
5959
"@cucumber/gherkin": "^26",
6060
"@cucumber/messages": "^21.0.1",
61+
"@xmldom/xmldom": "^0.7.9",
6162
"acorn": "^7.4.1",
6263
"arrify": "^2.0.1",
6364
"axios": "^1.3.3",
@@ -138,7 +139,6 @@
138139
"wdio-docker-service": "^1.5.0",
139140
"webdriverio": "^8.3.8",
140141
"xml2js": "^0.4.23",
141-
"xmldom": "^0.1.31",
142142
"xpath": "0.0.27"
143143
},
144144
"engines": {

test/unit/locator_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { expect } = require('chai');
2-
const Dom = require('xmldom').DOMParser;
2+
const { DOMParser } = require('@xmldom/xmldom');
33
const xpath = require('xpath');
44

55
const Locator = require('../../lib/locator');
@@ -56,7 +56,7 @@ const xml = `<body>
5656

5757
describe('Locator', () => {
5858
beforeEach(() => {
59-
doc = new Dom().parseFromString(xml);
59+
doc = new DOMParser().parseFromString(xml, 'application/xhtml+xml');
6060
});
6161

6262
describe('constructor', () => {

0 commit comments

Comments
 (0)