@askjo/camofox-browser 1.7.0 → 1.7.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/lib/reporter.js +6 -14
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/lib/reporter.js
CHANGED
|
@@ -10,7 +10,7 @@ import crypto from 'crypto';
|
|
|
10
10
|
|
|
11
11
|
const SAFE_HOSTS = new Set([
|
|
12
12
|
'github.com', 'api.github.com', 'npmjs.com', 'registry.npmjs.org',
|
|
13
|
-
'nodejs.org',
|
|
13
|
+
'nodejs.org',
|
|
14
14
|
]);
|
|
15
15
|
|
|
16
16
|
const SECRET_PREFIXES = [
|
|
@@ -64,17 +64,11 @@ export function anonymize(text) {
|
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
|
|
67
|
-
// 7. Strip IPv4 addresses
|
|
68
|
-
s = s.replace(/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b/g,
|
|
69
|
-
if (match === '127.0.0.1') return match;
|
|
70
|
-
return '<ip>';
|
|
71
|
-
});
|
|
67
|
+
// 7. Strip IPv4 addresses
|
|
68
|
+
s = s.replace(/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b/g, '<ip>');
|
|
72
69
|
|
|
73
|
-
// 8. Strip IPv6 addresses
|
|
74
|
-
s = s.replace(/\b(?:[0-9a-fA-F]{1,4}:){2,7}[0-9a-fA-F]{1,4}\b/g,
|
|
75
|
-
if (match === '::1') return match;
|
|
76
|
-
return '<ipv6>';
|
|
77
|
-
});
|
|
70
|
+
// 8. Strip IPv6 addresses
|
|
71
|
+
s = s.replace(/\b(?:[0-9a-fA-F]{1,4}:){2,7}[0-9a-fA-F]{1,4}\b/g, '<ipv6>');
|
|
78
72
|
s = s.replace(/::(?:ffff:)?(?:\d{1,3}\.){3}\d{1,3}/g, '<ipv6>');
|
|
79
73
|
|
|
80
74
|
// 9. Strip hostnames in connection errors
|
|
@@ -268,9 +262,7 @@ export function createUrlAnonymizer() {
|
|
|
268
262
|
const parts = [url.protocol + '//'];
|
|
269
263
|
const h = url.hostname.toLowerCase();
|
|
270
264
|
|
|
271
|
-
if (h
|
|
272
|
-
parts.push('localhost');
|
|
273
|
-
} else if (/^(\d{1,3}\.){3}\d{1,3}$/.test(h) || h.includes(':')) {
|
|
265
|
+
if (/^(\d{1,3}\.){3}\d{1,3}$/.test(h) || h.includes(':')) {
|
|
274
266
|
parts.push(hashHost(h));
|
|
275
267
|
} else if (isPublicDomain(h)) {
|
|
276
268
|
parts.push(h);
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED