@secondlayer/sdk 16.3.1 → 16.3.2

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.
@@ -264,7 +264,11 @@ function resolveIdentity(target, options = {}) {
264
264
  return { source: "none", token: undefined, url };
265
265
  }
266
266
  function seg(value) {
267
- return encodeURIComponent(String(value));
267
+ const text = String(value);
268
+ if (text === "" || text === "." || text === "..") {
269
+ throw new ApiError(400, "Invalid path segment");
270
+ }
271
+ return encodeURIComponent(text);
268
272
  }
269
273
  function buildQuery(params) {
270
274
  const search = new URLSearchParams;
@@ -1687,5 +1691,5 @@ export {
1687
1691
  decode
1688
1692
  };
1689
1693
 
1690
- //# debugId=8BCAE1BCFFCE4BBA64756E2164756E21
1694
+ //# debugId=DCFD47638C4ED63764756E2164756E21
1691
1695
  //# sourceMappingURL=index.js.map