Fix security vulnerabilities

This commit is contained in:
2026-10-13 15:52:34 +01:00
parent 74103a19c9
commit eefb2ea5d2
46 changed files with 375 additions and 403 deletions
+15
View File
@@ -0,0 +1,15 @@
export declare class RequestBodyTooLargeError extends Error {
status: number;
constructor(max_bytes: number);
}
type Params = {
req: Request;
max_bytes: number;
};
/**
* Reads the whole request body, aborting as soon as it grows past
* `max_bytes` so oversized (or chunked, length-less) bodies are never fully
* buffered. Returns `undefined` when the request has no body.
*/
export default function readRequestBody({ req, max_bytes, }: Params): Promise<Uint8Array<ArrayBuffer> | undefined>;
export {};