From 0417830fe9f82430b53073a443930a4e9e052398 Mon Sep 17 00:00:00 2001 From: Gaspard Wierzbinski Date: Sun, 28 Jul 2024 09:22:52 +0200 Subject: [PATCH] fix(validator): Add double quotation marks to multipart checker regex (#3195) --- src/validator/validator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validator/validator.ts b/src/validator/validator.ts index c0795fe5..076fccb4 100644 --- a/src/validator/validator.ts +++ b/src/validator/validator.ts @@ -24,7 +24,7 @@ export type ValidationFunction< type ExcludeResponseType = T extends Response & TypedResponse ? never : T const jsonRegex = /^application\/([a-z-\.]+\+)?json$/ -const multipartRegex = /^multipart\/form-data(; boundary=[A-Za-z0-9'()+_,\-./:=?]+)?$/ +const multipartRegex = /^multipart\/form-data(; boundary=[A-Za-z0-9'"()+_,\-./:=?]+)?$/ const urlencodedRegex = /^application\/x-www-form-urlencoded$/ export const validator = <