mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
fixing security hole. reference : http://moodle.org/mod/forum/discuss.php?d=85748#p379857
Inaki Arenzana
This commit is contained in:
parent
bbebbc0c57
commit
26fc4193f5
@ -24,7 +24,7 @@ function get_text_for_indexing_doc(&$resource){
|
||||
mtrace('Error with MSWord to text converter command : exectuable not found.');
|
||||
}
|
||||
else{
|
||||
$file = $CFG->dataroot.'/'.$resource->course.'/'.$resource->reference;
|
||||
$file = escapeshellarg($CFG->dataroot.'/'.$resource->course.'/'.$resource->reference);
|
||||
$text_converter_cmd = "{$CFG->dirroot}/{$CFG->block_search_word_to_text_cmd} $file";
|
||||
if ($CFG->block_search_word_to_text_env){
|
||||
putenv($CFG->block_search_word_to_text_env);
|
||||
|
@ -21,7 +21,7 @@ function get_text_for_indexing_pdf(&$resource){
|
||||
mtrace('Error with pdf to text converter command : exectuable not found.');
|
||||
}
|
||||
else{
|
||||
$file = $CFG->dataroot.'/'.$resource->course.'/'.$resource->reference;
|
||||
$file = escapeshellarg($CFG->dataroot.'/'.$resource->course.'/'.$resource->reference);
|
||||
$text_converter_cmd = "{$CFG->dirroot}/{$CFG->block_search_pdf_to_text_cmd} $file -";
|
||||
$result = shell_exec($text_converter_cmd);
|
||||
if ($result){
|
||||
|
Loading…
x
Reference in New Issue
Block a user