From 52c03662d8cc5f063203f763d0ff0666e8d883e8 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Wed, 18 Mar 2020 22:40:26 +0200 Subject: [PATCH 1/2] add encodeURIComponent if AlgoMetadata is used --- src/brizo/Brizo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index 3114aef..06c5ca2 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -138,7 +138,7 @@ export class Brizo extends Instantiable { url += `&consumerAddress=${address}` url += `&serviceAgreementId=${noZeroX(serviceAgreementId)}` url += (algorithmDid && `&algorithmDid=${algorithmDid}`) || '' - url += (algorithmMeta && `&algorithmMeta=${JSON.stringify(algorithmMeta)}`) || '' + url += (algorithmMeta && `&algorithmMeta=${encodeURIComponent(JSON.stringify(algorithmMeta))}`) || '' url += (output && `&output=${JSON.stringify(output)}`) || '' url += (jobId && `&jobId=${jobId}`) || '' From 03fafcf0f1ccf2c703b9603c587d78f13f379ac2 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Wed, 18 Mar 2020 23:34:42 +0200 Subject: [PATCH 2/2] fix --- src/brizo/Brizo.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index 06c5ca2..bbb3e29 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -138,7 +138,10 @@ export class Brizo extends Instantiable { url += `&consumerAddress=${address}` url += `&serviceAgreementId=${noZeroX(serviceAgreementId)}` url += (algorithmDid && `&algorithmDid=${algorithmDid}`) || '' - url += (algorithmMeta && `&algorithmMeta=${encodeURIComponent(JSON.stringify(algorithmMeta))}`) || '' + url += + (algorithmMeta && + `&algorithmMeta=${encodeURIComponent(JSON.stringify(algorithmMeta))}`) || + '' url += (output && `&output=${JSON.stringify(output)}`) || '' url += (jobId && `&jobId=${jobId}`) || ''