From e516d5338ce0c9b774aa4cd32105fb7923937676 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Fri, 13 Mar 2020 18:30:53 -0700 Subject: [PATCH] Reject param paths containing empty segments --- lib/common/path.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/common/path.ts b/lib/common/path.ts index 52d47d6..97b4289 100644 --- a/lib/common/path.ts +++ b/lib/common/path.ts @@ -97,6 +97,7 @@ export default class Path { ) ++index; const s = pattern.slice(j, index).trim(); + if (!s) throw new Error("Invalid parameter path"); segments.push(s); }