@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.
package/dist/index.js CHANGED
@@ -268,7 +268,11 @@ function resolveIdentity(target, options = {}) {
268
268
  return { source: "none", token: undefined, url };
269
269
  }
270
270
  function seg(value) {
271
- return encodeURIComponent(String(value));
271
+ const text = String(value);
272
+ if (text === "" || text === "." || text === "..") {
273
+ throw new ApiError(400, "Invalid path segment");
274
+ }
275
+ return encodeURIComponent(text);
272
276
  }
273
277
  function buildQuery(params) {
274
278
  const search = new URLSearchParams;
@@ -3537,5 +3541,5 @@ export {
3537
3541
  verifyWebhookSignature
3538
3542
  };
3539
3543
 
3540
- //# debugId=7941E39982D460D764756E2164756E21
3544
+ //# debugId=9778632EEAAB2B7564756E2164756E21
3541
3545
  //# sourceMappingURL=index.js.map