Reject param paths containing empty segments

This commit is contained in:
Zaid Abdulla committed 2020-03-13 18:30:53 -07:00
1 parent 41f3987db4
commit e516d5338c
1 file changed
+1
+1
View File
@@ -97,6 +97,7 @@ export default class Path {
) )
++index; ++index;
const s = pattern.slice(j, index).trim(); const s = pattern.slice(j, index).trim();
if (!s) throw new Error("Invalid parameter path");
segments.push(s); segments.push(s);
} }