mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
change crypto to always use utf-8 as it works with aws
This commit is contained in:
parent
aaa2a099f1
commit
738e33a052
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ module.exports = DocArchive =
|
|||
if err? || res.statusCode != 200
|
||||
logger.err err:err, res:res, project_id:project_id, doc_id: doc._id, statusCode: res?.statusCode, "something went wrong archiving doc in aws"
|
||||
return callback new Error("Error in S3 request")
|
||||
md5lines = crypto.createHash("md5").update(JSON.stringify(doc.lines)).digest("hex")
|
||||
md5lines = crypto.createHash("md5").update(JSON.stringify(doc.lines), "utf8").digest("hex")
|
||||
md5response = res.headers.etag.toString().replace(/\"/g, '')
|
||||
if md5lines != md5response
|
||||
logger.err responseMD5:md5response, linesMD5:md5lines, project_id:project_id, doc_id: doc?._id, "err in response md5 from s3"
|
||||
|
|
Loading…
Reference in a new issue