Permalink
Browse files

Adding escapeshellarg to aspell path

  • Loading branch information...
1 parent 399d7b3 commit 4d20567f6144d7a7611946d71c04939fc6fe74a0 julmis committed Aug 25, 2005
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/speller/server-scripts/spellchecker.php
@@ -7,7 +7,7 @@
// Speller pages script http://spellerpages.sourceforge.net/
// Modified by Marc Alier on August 2004 for the integration with moodle
-$aspell_prog = $CFG->aspellpath;
+$aspell_prog = escapeshellarg($CFG->aspellpath);
$spellercss = $CFG->wwwroot .'/lib/speller/spellerStyle.css';
$word_win_src = $CFG->wwwroot .'/lib/speller/wordWindow.js';
@@ -37,7 +37,7 @@ function check_language($cmd) {
$current_lang = current_language();
$output = '';
- if(!($handle = popen($cmd .' dump dicts', 'r'))) {
+ if(!($handle = popen(escapeshellarg($cmd) .' dump dicts', 'r'))) {
error_handler("Couldn't create handle!");
exit;
}

0 comments on commit 4d20567

Please sign in to comment.