@adobe/helix-html-pipeline 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.2.1](https://github.com/adobe/helix-html-pipeline/compare/v1.2.0...v1.2.1) (2022-03-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * reject double-slashes ([#22](https://github.com/adobe/helix-html-pipeline/issues/22)) ([5aee75d](https://github.com/adobe/helix-html-pipeline/commit/5aee75d4109550525d971c64d87e4f2420863c30)), closes [#20](https://github.com/adobe/helix-html-pipeline/issues/20)
7
+
1
8
  # [1.2.0](https://github.com/adobe/helix-html-pipeline/compare/v1.1.3...v1.2.0) (2022-03-16)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/utils/path.js CHANGED
@@ -20,7 +20,10 @@ export function getPathInfo(path) {
20
20
  // eslint-disable-next-line no-param-reassign
21
21
  path = '/';
22
22
  }
23
- const segs = path.split(/\/+/);
23
+ if (path.match(/\/\/+/)) {
24
+ return null;
25
+ }
26
+ const segs = path.split('/');
24
27
  segs.shift(); // remove _emptyness_ before first slash
25
28
  if (segs.length < 1) {
26
29
  return null;