diff --git a/packages/validators/src/url/schema.ts b/packages/validators/src/url/schema.ts index 0aadaf2..8050591 100644 --- a/packages/validators/src/url/schema.ts +++ b/packages/validators/src/url/schema.ts @@ -48,6 +48,11 @@ export const toSchema = (options: ParsedUrlValidatorOptions) => { } } + // don't allow pathname with double slashes + if (url.pathname.replace(/\\/g, '/').startsWith('//')) { + return false + } + // don't allow dynamic routes if (isDynamicRoute(url)) { return false