mcp-google-multi 6.0.0-alpha.46 → 6.0.0-alpha.47
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/doctor.js +28 -2
- package/package.json +1 -1
package/dist/doctor.js
CHANGED
|
@@ -341,9 +341,35 @@ export function renderDoctorText(report) {
|
|
|
341
341
|
out.push(`Overall: ${report.verdict.toUpperCase()}`);
|
|
342
342
|
return out.join('\n');
|
|
343
343
|
}
|
|
344
|
-
|
|
344
|
+
const EMAIL_LOCAL_CHAR = /[A-Za-z0-9._%+-]/;
|
|
345
|
+
const EMAIL_DOMAIN_CHAR = /[A-Za-z0-9.-]/;
|
|
346
|
+
/** Mask the local-part of an email so a report never carries a full address
|
|
347
|
+
* (BR8). A linear scan, not a regex: the `local* @domain` pattern backtracks
|
|
348
|
+
* polynomially on long local-charset runs without an @ (CodeQL
|
|
349
|
+
* js/polynomial-redos), and report text can embed arbitrary error strings. */
|
|
345
350
|
function maskEmails(text) {
|
|
346
|
-
|
|
351
|
+
let out = '';
|
|
352
|
+
let i = 0;
|
|
353
|
+
while (i < text.length) {
|
|
354
|
+
if (text[i] === '@') {
|
|
355
|
+
let j = i + 1;
|
|
356
|
+
while (j < text.length && EMAIL_DOMAIN_CHAR.test(text[j]))
|
|
357
|
+
j += 1;
|
|
358
|
+
let k = out.length;
|
|
359
|
+
while (k > 0 && EMAIL_LOCAL_CHAR.test(out[k - 1]))
|
|
360
|
+
k -= 1;
|
|
361
|
+
if (j > i + 1 && k < out.length) {
|
|
362
|
+
// keep the first local char, mask the rest ('*' is outside the local
|
|
363
|
+
// charset, so a masked run can never be re-masked by a later @)
|
|
364
|
+
out = `${out.slice(0, k + 1)}***${text.slice(i, j)}`;
|
|
365
|
+
i = j;
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
out += text[i];
|
|
370
|
+
i += 1;
|
|
371
|
+
}
|
|
372
|
+
return out;
|
|
347
373
|
}
|
|
348
374
|
/** Redacted, paste-ready bug report (BR8): verdicts + provenance labels + token
|
|
349
375
|
* statuses + slugs; NO token values, secrets, keys, or full email addresses. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-google-multi",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.47",
|
|
4
4
|
"mcpName": "io.github.bakissation/mcp-google-multi",
|
|
5
5
|
"description": "Local MCP server for Google Workspace (Gmail, Drive, Calendar, Sheets, Docs, Contacts, Tasks, Meet, Search Console, +Forms/Chat/Admin) across multiple accounts — OAuth-only, encrypted token storage, deny-by-default writes.",
|
|
6
6
|
"type": "module",
|