diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-03-20 03:43:57 +1100 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-03-20 03:43:57 +1100 |
| commit | 7e1ff9580def37d98a6358cfc0af56c3184a4ff0 (patch) | |
| tree | c151fe7b4e3140218b480c2b974b2ffaa0a20629 /mod.php | |
| parent | 58baab6a6e011bd72f16257b833cf204a9794e71 (diff) | |
escapeshellarg() for auto-upgrade unzip
Diffstat (limited to 'mod.php')
| -rw-r--r-- | mod.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -369,7 +369,7 @@ // For some reason, reading the ZIP entries in PHP doesn't seem to work very well. // Use shell instead. - shell_exec('TEMP_DIR=$(mktemp -d); unzip -q "' . $temp . '" -d $TEMP_DIR -x "' . $dir . 'inc/instance-config.php"; mv -v $TEMP_DIR/' . $dir . '* "' . getcwd() . '"; rm -rf $TEMP_DIR'); + shell_exec('TEMP_DIR=$(mktemp -d); unzip -q ' . escapeshellarg($temp) . ' -d $TEMP_DIR -x "' . escapeshellarg($dir) . 'inc/instance-config.php"; mv -v $TEMP_DIR/' . escapeshellarg($dir) . '* "' . getcwd() . '"; rm -rf $TEMP_DIR'); unlink($temp); |
