From 05e04c2852bd19ee82d963d5363bf6dcda940e88 Mon Sep 17 00:00:00 2001 From: Harunobu Ishii Date: Fri, 24 May 2024 13:52:35 -0400 Subject: [PATCH] testing if this works fine --- lib/client/protocols/arrays/share.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/client/protocols/arrays/share.js b/lib/client/protocols/arrays/share.js index ebddb1160..193962596 100644 --- a/lib/client/protocols/arrays/share.js +++ b/lib/client/protocols/arrays/share.js @@ -202,13 +202,17 @@ class ShareArray { ); }; + sanitize(input) { + return input.replace(/[^a-zA-Z0-9:_-]/g, ''); + } + share_array_single_sender = (jiff, secrets, threshold, receivers_list, sender, Zp, share_id) => { if (secrets != null && secrets.length === 0) { return Promise.resolve([]); } else if (secrets != null && Array.isArray(secrets)) { const promised_array = []; for (let j = 0; j < secrets.length; j++) { - share_id = String(share_id) + share_id = sanitize(share_id); promised_array.push(this.share_array_single_sender(jiff, secrets[j], threshold, receivers_list, sender, Zp, share_id + ':' + j)); }