diff --git a/services/spelling/app/js/ASpellWorker.js b/services/spelling/app/js/ASpellWorker.js index 702d03e1d9..ff4debd034 100644 --- a/services/spelling/app/js/ASpellWorker.js +++ b/services/spelling/app/js/ASpellWorker.js @@ -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') } }