Skip to content

Commit 1917c50

Browse files
committed
fix: polynomial regular expression used on uncontrolled data
Signed-off-by: will Farrell <[email protected]>
1 parent c5307f0 commit 1917c50

File tree

1 file changed

+1
-1
lines changed
  • packages/http-multipart-body-parser

1 file changed

+1
-1
lines changed

packages/http-multipart-body-parser/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import BusBoy from "@fastify/busboy";
22
import { createError } from "@middy/util";
33

44
const mimePattern =
5-
/^multipart\/form-data; boundary=[-]*[a-zA-Z0-9-]*(; ?[cC]harset=[\w-]+)?$/;
5+
/^multipart\/form-data; boundary=[a-zA-Z0-9-]{1,70}(; ?[cC]harset=[\w-]+)?$/;
66
const fieldnamePattern = /(.+)\[(.*)]$/;
77

88
const defaults = {

0 commit comments

Comments
 (0)