Skip to content

Commit 67b26bb

Browse files
authored
Revert "Potential fix for code scanning alert no. 2: Incomplete URL substring sanitization" (#358)
1 parent 6f4dc79 commit 67b26bb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

cypress/e2e/links-and-images.cy.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as urlLib from 'url';
2-
31
describe("links-and-images", () => {
42
it("should return 200 for all links and images", () => {
53
const testedPages = new Set<string>();
@@ -65,10 +63,7 @@ describe("links-and-images", () => {
6563
}
6664

6765
cy.log('>>>> Adding "' + url + '" to pages to test');
68-
const parsedUrl = urlLib.parse(url);
69-
const host = parsedUrl.host || "";
70-
const allowedHosts = ["davidhu.io"];
71-
if (allowedHosts.includes(host) && !testedPages.has(url)) {
66+
if (url.includes("davidhu.io/") && !testedPages.has(url)) {
7267
pagesToTest.push(url);
7368
}
7469
});

0 commit comments

Comments
 (0)