From edacb640332eae37665551d35bf29160707336f0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 9 Sep 2022 11:46:58 +0200 Subject: [PATCH] Don't use safe mode when normalizing --- server/helpers/peertube-crypto.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts index 1d9cab2ce..8aca50900 100644 --- a/server/helpers/peertube-crypto.ts +++ b/server/helpers/peertube-crypto.ts @@ -135,12 +135,11 @@ export { // --------------------------------------------------------------------------- function hashObject (obj: any): Promise { - return jsonld.promises - .normalize(obj, { - algorithm: 'URDNA2015', - format: 'application/n-quads' - }) - .then(res => sha256(res)) + return jsonld.promises.normalize(obj, { + safe: false, + algorithm: 'URDNA2015', + format: 'application/n-quads' + }).then(res => sha256(res)) } function createSignatureHash (signature: any) { -- 2.41.0