mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 21:03:39 -05:00
add null byte check for ranges
This commit is contained in:
parent
a13f055d62
commit
54ad45c870
1 changed files with 4 additions and 0 deletions
|
@ -181,6 +181,10 @@ module.exports = RedisManager =
|
||||||
if error?
|
if error?
|
||||||
logger.error {err: error, doc_id}, error.message
|
logger.error {err: error, doc_id}, error.message
|
||||||
return callback(error)
|
return callback(error)
|
||||||
|
if ranges? and ranges.indexOf("\u0000") != -1
|
||||||
|
error = new Error("null bytes found in ranges")
|
||||||
|
logger.error err: error, doc_id: doc_id, ranges: ranges, error.message
|
||||||
|
return callback(error)
|
||||||
multi = rclient.multi()
|
multi = rclient.multi()
|
||||||
multi.eval setScript, 1, keys.docLines(doc_id:doc_id), newDocLines # index 0
|
multi.eval setScript, 1, keys.docLines(doc_id:doc_id), newDocLines # index 0
|
||||||
multi.set keys.docVersion(doc_id:doc_id), newVersion # index 1
|
multi.set keys.docVersion(doc_id:doc_id), newVersion # index 1
|
||||||
|
|
Loading…
Reference in a new issue