mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #85 from overleaf/jpa-sanitize-worker-input
[AspellWorker] sanitize user input before writing it to the worker pipe
This commit is contained in:
commit
5a6c30fd17
1 changed files with 2 additions and 0 deletions
|
@ -233,6 +233,8 @@ class ASpellWorker {
|
|||
}
|
||||
|
||||
sendCommand(command) {
|
||||
// Sanitize user input. Reject line feed characters.
|
||||
command = command.replace(/[\r\n]/g, '')
|
||||
return this.pipe.stdin.write(command + '\n')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue