mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-30 18:24:29 +01:00
escapeshellarg() for auto-upgrade unzip
This commit is contained in:
parent
58baab6a6e
commit
7e1ff9580d
2
mod.php
2
mod.php
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user