Skip to content

Commit e8dda46

Browse files
author
Pascal Dreissen
committed
escapeshellarg document root for security reasons (fixes #3984)
1 parent ff26b45 commit e8dda46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ function update($event_name, $data) {
884884
}
885885

886886
// get the primitive folder for document_root and the filesystem, will need it later.
887-
$df_output=explode(" ", exec("df -T " . $data['new']['document_root'] . "|awk 'END{print \$2,\$NF}'"));
887+
$df_output=explode(" ", exec("df -T " . escapeshellarg($data['new']['document_root']) . "|awk 'END{print \$2,\$NF}'"));
888888
$file_system = $df_output[0];
889889
$primitive_root = $df_output[1];
890890

server/plugins-available/cron_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function update($event_name, $data) {
136136
}
137137

138138
// get the primitive folder for document_root and the filesystem, will need it later.
139-
$df_output=explode(" ", exec("df -T " . $parent_domain["document_root"] . "|awk 'END{print \$2,\$NF}'"));
139+
$df_output=explode(" ", exec("df -T " . escapeshellarg($parent_domain["document_root"]) . "|awk 'END{print \$2,\$NF}'"));
140140
$file_system = $df_output[0];
141141
$primitive_root = $df_output[1];
142142

0 commit comments

Comments
 (0)