diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-09 11:46:58 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-09 11:46:58 +0200 |
commit | edacb640332eae37665551d35bf29160707336f0 (patch) | |
tree | 4ec18f7954238d1343ee932e35695bb58267f437 | |
parent | 914af0d9e40787c2ab1a842e1b41136bdd32eaa8 (diff) | |
download | PeerTube-edacb640332eae37665551d35bf29160707336f0.tar.gz PeerTube-edacb640332eae37665551d35bf29160707336f0.tar.zst PeerTube-edacb640332eae37665551d35bf29160707336f0.zip |
Don't use safe mode when normalizing
-rw-r--r-- | server/helpers/peertube-crypto.ts | 11 |
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 | ||
137 | function hashObject (obj: any): Promise<any> { | 137 | function 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 | ||
146 | function createSignatureHash (signature: any) { | 145 | function createSignatureHash (signature: any) { |