@forklaunch/hyper-express-fork
Advanced tools
+1
-1
| { | ||
| "name": "@forklaunch/hyper-express-fork", | ||
| "version": "6.17.3", | ||
| "version": "6.17.30", | ||
| "description": "High performance Node.js webserver with a simple-to-use API powered by uWebsockets.js under the hood.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -69,5 +69,6 @@ 'use strict'; | ||
| */ | ||
| handle(request, response, cursor = 0) { | ||
| handle(request, response, cursor = 0, seen_cursors = new Set([])) { | ||
| // Do not handle the request if the response has been sent aka. the request is no longer active | ||
| if (response.completed) return; | ||
| if (response.completed || seen_cursors.has(cursor)) return; | ||
| seen_cursors.add(cursor); | ||
@@ -86,7 +87,7 @@ // Retrieve the middleware for the current cursor, track the cursor if there is a valid middleware | ||
| // This handles cases where "/docs" middleware will incorrectly match "/docs-JSON" for example | ||
| return this.handle(request, response, cursor + 1); | ||
| return this.handle(request, response, cursor + 1, seen_cursors); | ||
| } | ||
| } else { | ||
| // Since the middleware pattern does not match the start of the request path, skip this middleware | ||
| return this.handle(request, response, cursor + 1); | ||
| return this.handle(request, response, cursor + 1, seen_cursors); | ||
| } | ||
@@ -104,3 +105,3 @@ } | ||
| // Handle this request again with an incremented cursor to execute the next middleware or route handler | ||
| this.handle(request, response, cursor + 1); | ||
| this.handle(request, response, cursor + 1, seen_cursors); | ||
| }; | ||
@@ -107,0 +108,0 @@ } |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
233908
0.06%5389
0.02%19
5.56%