[AspellWorker] sanitize user input before writing it to the worker pipe

This commit is contained in:
Jakob Ackermann 2021-05-03 11:57:48 +01:00
parent ed9cacbecd
commit 944a243753

View file

@ -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')
}
}