mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add missing callback for null byte check
This commit is contained in:
parent
b71a15a6a0
commit
e8dfe3099f
1 changed files with 1 additions and 0 deletions
|
@ -49,6 +49,7 @@ module.exports = MongoAWS =
|
|||
if uncompressedData.indexOf("\u0000") != -1
|
||||
error = new Error("null bytes found in upload")
|
||||
logger.error err: error, project_id: project_id, doc_id: doc_id, pack_id: pack_id, error.message
|
||||
return callback(error)
|
||||
zlib.gzip uncompressedData, (err, buf) ->
|
||||
logger.log {project_id, doc_id, pack_id, origSize: uncompressedData.length, newSize: buf.length}, "compressed pack"
|
||||
return callback(err) if err?
|
||||
|
|
Loading…
Reference in a new issue