aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-09 11:46:58 +0200
committerChocobozzz <me@florianbigard.com>2022-09-09 11:46:58 +0200
commitedacb640332eae37665551d35bf29160707336f0 (patch)
tree4ec18f7954238d1343ee932e35695bb58267f437 /server
parent914af0d9e40787c2ab1a842e1b41136bdd32eaa8 (diff)
downloadPeerTube-edacb640332eae37665551d35bf29160707336f0.tar.gz
PeerTube-edacb640332eae37665551d35bf29160707336f0.tar.zst
PeerTube-edacb640332eae37665551d35bf29160707336f0.zip
Don't use safe mode when normalizing
Diffstat (limited to 'server')
-rw-r--r--server/helpers/peertube-crypto.ts11
1 files 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 {
135// --------------------------------------------------------------------------- 135// ---------------------------------------------------------------------------
136 136
137function hashObject (obj: any): Promise<any> { 137function hashObject (obj: any): Promise<any> {
138 return jsonld.promises 138 return jsonld.promises.normalize(obj, {
139 .normalize(obj, { 139 safe: false,
140 algorithm: 'URDNA2015', 140 algorithm: 'URDNA2015',
141 format: 'application/n-quads' 141 format: 'application/n-quads'
142 }) 142 }).then(res => sha256(res))
143 .then(res => sha256(res))
144} 143}
145 144
146function createSignatureHash (signature: any) { 145function createSignatureHash (signature: any) {