Skip to content

Commit e986d8a

Browse files
excessive iteration
1 parent 6cd1f94 commit e986d8a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CWE-834/main.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const main = async () => {
2+
const response = await fetch('/api', (req, res) => {
3+
const result = req.body
4+
5+
for (let i = 0; i < result.length; i++) {
6+
console.log('Potential Denial of Service attack.')
7+
}
8+
})
9+
10+
return response.json()
11+
}

0 commit comments

Comments
 (0)