mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +00:00
add null byte check for ops
This commit is contained in:
parent
6e26d89090
commit
a13f055d62
1 changed files with 5 additions and 0 deletions
|
@ -162,6 +162,11 @@ module.exports = RedisManager =
|
|||
return callback(error)
|
||||
|
||||
jsonOps = appliedOps.map (op) -> JSON.stringify op
|
||||
if jsonOps.indexOf("\u0000") != -1
|
||||
error = new Error("null bytes found in jsonOps")
|
||||
logger.error err: error, doc_id: doc_id, jsonOps: jsonOps, error.message
|
||||
return callback(error)
|
||||
|
||||
newDocLines = JSON.stringify(docLines)
|
||||
if newDocLines.indexOf("\u0000") != -1
|
||||
error = new Error("null bytes found in doc lines")
|
||||
|
|
Loading…
Reference in a new issue