@zuplo/cli 7.9.14 → 7.9.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../src/privacy.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAqiBD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAKxF;AA6DD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU/C;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAE/F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAE/F"}
1
+ {"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../src/privacy.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AA2iBD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAKxF;AA6DD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU/C;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAE/F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAE/F"}
@@ -95,7 +95,10 @@ function sanitizeUrlFields(fields, allowNestedUrls) {
95
95
  const sanitized = new URLSearchParams();
96
96
  let changed = false;
97
97
  let lastFieldSensitive = false;
98
- for (const [key, value] of new URLSearchParams(fields)){
98
+ for (const [decodedKey, decodedValue] of new URLSearchParams(fields)){
99
+ const key = redactCredentials(decodedKey);
100
+ const value = redactCredentials(decodedValue);
101
+ changed ||= key !== decodedKey || value !== decodedValue;
99
102
  const sanitizedValue = sanitizeUrlFieldValue(key, value, allowNestedUrls);
100
103
  changed ||= sanitizedValue !== value;
101
104
  lastFieldSensitive = shouldRedactQueryKey(key) || sanitizedValue !== value;
@@ -237,7 +240,7 @@ function sanitizeSingleUrl(value, mode) {
237
240
  changed = true;
238
241
  }
239
242
  const trailingFields = hasFragment ? sanitizedTail ?? sanitizedHead : sanitizedQuery;
240
- return (changed ? url.toString() : address) + (trailingFields.lastFieldSensitive ? '' : suffix);
243
+ return (changed ? redactCredentials(url.toString()) : address) + (trailingFields.lastFieldSensitive ? '' : suffix);
241
244
  }
242
245
  function sanitizeUrlsInString(text, mode) {
243
246
  return text.replace(URL_PATTERN, (match)=>sanitizeUrl(match, {
@@ -66,7 +66,10 @@ function sanitizeUrlFields(fields, allowNestedUrls) {
66
66
  const sanitized = new URLSearchParams();
67
67
  let changed = false;
68
68
  let lastFieldSensitive = false;
69
- for (const [key, value] of new URLSearchParams(fields)){
69
+ for (const [decodedKey, decodedValue] of new URLSearchParams(fields)){
70
+ const key = redactCredentials(decodedKey);
71
+ const value = redactCredentials(decodedValue);
72
+ changed ||= key !== decodedKey || value !== decodedValue;
70
73
  const sanitizedValue = sanitizeUrlFieldValue(key, value, allowNestedUrls);
71
74
  changed ||= sanitizedValue !== value;
72
75
  lastFieldSensitive = shouldRedactQueryKey(key) || sanitizedValue !== value;
@@ -208,7 +211,7 @@ function sanitizeSingleUrl(value, mode) {
208
211
  changed = true;
209
212
  }
210
213
  const trailingFields = hasFragment ? sanitizedTail ?? sanitizedHead : sanitizedQuery;
211
- return (changed ? url.toString() : address) + (trailingFields.lastFieldSensitive ? '' : suffix);
214
+ return (changed ? redactCredentials(url.toString()) : address) + (trailingFields.lastFieldSensitive ? '' : suffix);
212
215
  }
213
216
  function sanitizeUrlsInString(text, mode) {
214
217
  return text.replace(URL_PATTERN, (match)=>sanitizeUrl(match, {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/core",
3
- "version": "1.57.0",
3
+ "version": "1.57.2",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -34,6 +34,7 @@
34
34
  },
35
35
  "files": [
36
36
  "dist",
37
+ "surveys",
37
38
  "src",
38
39
  "!src/__tests__"
39
40
  ],
@@ -70,7 +71,7 @@
70
71
  }
71
72
  },
72
73
  "dependencies": {
73
- "@posthog/types": "^1.415.0"
74
+ "@posthog/types": "^1.415.1"
74
75
  },
75
76
  "devDependencies": {
76
77
  "@rslib/core": "0.23.2",
@@ -209,7 +209,12 @@ function sanitizeUrlFields(
209
209
  const sanitized = new URLSearchParams()
210
210
  let changed = false
211
211
  let lastFieldSensitive = false
212
- for (const [key, value] of new URLSearchParams(fields)) {
212
+ // Parsing decodes each field, which can turn an encoded PostHog token
213
+ // (`%70hx_...`) into a plain one, so tokens are redacted again after decoding.
214
+ for (const [decodedKey, decodedValue] of new URLSearchParams(fields)) {
215
+ const key = redactCredentials(decodedKey)
216
+ const value = redactCredentials(decodedValue)
217
+ changed ||= key !== decodedKey || value !== decodedValue
213
218
  const sanitizedValue = sanitizeUrlFieldValue(key, value, allowNestedUrls)
214
219
  // `changed` is compared, not inferred from the key: the PostHog-token pass
215
220
  // runs first, so a value can already read `[redacted]`, and calling that a
@@ -479,7 +484,8 @@ function sanitizeSingleUrl(value: string, mode: UrlSanitizeMode): string {
479
484
  // with it; losing a comma from the surrounding prose is the accepted cost of
480
485
  // not shipping `!!!`.
481
486
  const trailingFields = hasFragment ? (sanitizedTail ?? sanitizedHead) : sanitizedQuery
482
- return (changed ? url.toString() : address) + (trailingFields.lastFieldSensitive ? '' : suffix)
487
+ // Serializing writes the host decoded, which can expose an encoded PostHog token.
488
+ return (changed ? redactCredentials(url.toString()) : address) + (trailingFields.lastFieldSensitive ? '' : suffix)
483
489
  }
484
490
 
485
491
  /**
@@ -0,0 +1,6 @@
1
+ {
2
+ "private": true,
3
+ "main": "../dist/surveys/index.js",
4
+ "module": "../dist/surveys/index.mjs",
5
+ "types": "../dist/surveys/index.d.ts"
6
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/core",
3
- "version": "7.9.14",
3
+ "version": "7.9.16",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/graphql",
3
3
  "type": "module",
4
- "version": "7.9.14",
4
+ "version": "7.9.16",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -2,7 +2,7 @@
2
2
  "name": "@zuplo/openapi-tools",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "7.9.14",
5
+ "version": "7.9.16",
6
6
  "description": "Tooling for OpenAPI files",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/otel",
3
3
  "type": "module",
4
- "version": "7.9.14",
4
+ "version": "7.9.16",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {