]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Don't use safe mode when normalizing
authorChocobozzz <me@florianbigard.com>
Fri, 9 Sep 2022 09:46:58 +0000 (11:46 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 9 Sep 2022 09:46:58 +0000 (11:46 +0200)
server/helpers/peertube-crypto.ts

index 1d9cab2ce282e86b5f7095098524e608fc0a5eb8..8aca509009bb1649aefce6fe7abdc9046e67a9a2 100644 (file)
@@ -135,12 +135,11 @@ export {
 // ---------------------------------------------------------------------------
 
 function hashObject (obj: any): Promise<any> {
-  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) {