Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7d1fade

Browse filesBrowse files
authored
fix: mitigate ReDos issues & linting issues (#659)
Releases bb6c4f9
1 parent bb6c4f9 commit 7d1fade
Copy full SHA for 7d1fade

File tree

Expand file treeCollapse file tree

1 file changed

+9
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-5
lines changed

‎test/paginate.test.ts

Copy file name to clipboardExpand all lines: test/paginate.test.ts
+9-5Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,22 @@ describe("pagination", () => {
2727
const startTime = performance.now();
2828
try {
2929
for await (const normalizedResponse of octokit.paginate.iterator(
30-
"GET /repos/{owner}/{repo}/issues", { owner: "DayShift", repo: "ReDos", per_page: 100 }
31-
)) {}
30+
"GET /repos/{owner}/{repo}/issues",
31+
{ owner: "DayShift", repo: "ReDos", per_page: 100 },
32+
)) {
33+
}
3234
} catch (error) {
3335
// pass
3436
}
3537
const endTime = performance.now();
3638
const elapsedTime = endTime - startTime;
37-
const reDosThreshold = 2000;
38-
39+
const reDosThreshold = 2000;
40+
3941
expect(elapsedTime).toBeLessThanOrEqual(reDosThreshold);
4042
if (elapsedTime > reDosThreshold) {
41-
console.warn(`🚨 Potential ReDoS Attack! getDuration method took ${elapsedTime.toFixed(2)} ms, exceeding threshold of ${reDosThreshold} ms.`);
43+
console.warn(
44+
`🚨 Potential ReDoS Attack! getDuration method took ${elapsedTime.toFixed(2)} ms, exceeding threshold of ${reDosThreshold} ms.`,
45+
);
4246
}
4347
});
4448

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.