diff --git a/bureau/admin/bro_main.php b/bureau/admin/bro_main.php index 86d30eaa..94b095a6 100644 --- a/bureau/admin/bro_main.php +++ b/bureau/admin/bro_main.php @@ -141,7 +141,6 @@ if (!empty($formu) && $formu) { } if (isset($actextract) && $actextract) { - print _("extracting...")."
\n"; flush(); if ($bro->ExtractFile($R. '/' . $fileextract, $R)) { echo "

"; print $err->errstr(); diff --git a/bureau/class/m_bro.php b/bureau/class/m_bro.php index 6755f93a..47a72766 100644 --- a/bureau/class/m_bro.php +++ b/bureau/class/m_bro.php @@ -666,25 +666,24 @@ class m_bro { $err->raise("bro",_("File or folder name is incorrect")); return 1; } - $file=escapeshellarg($file); - $dest_to_fix=$dest; - $dest=escapeshellarg($dest); - #$dest_to_fix=str_replace(getuserpath(),'',$dest); - - // TODO new version of tar supports `tar xf ...` so there is no - // need to specify the compression format - exec("tar -xf ".escapeshellarg($file)." -C ".escapeshellarg($dest), $void, $ret); - if ($ret) { - exec("tar -xjf ".escapeshellarg($file)." -C ".escapeshellarg($dest), $void, $ret); + $lfile=strtolower($file); + if (substr($lfile,-4)==".tar" || substr($lfile,-8)==".tar.bz2" || substr($lfile,-7)==".tar.gz" || substr($lfile,-6)==".tar.z") { + // TODO new version of tar supports `tar xf ...` so there is no + // need to specify the compression format + echo "

"._("Uncompressing through TAR")."

";
+      passthru("tar -xf ".escapeshellarg($file)." -C ".escapeshellarg($dest)." 2>&1", $ret);
     }
-    if ($ret) {
-      $cmd="unzip -o ".escapeshellarg($file)." -d ".escapeshellarg($dest);
-      exec($cmd, $void, $ret);
+    if (substr($lfile,-4)==".zip") {
+      echo "

"._("Uncompressing through UNZIP")."

";
+      $cmd="unzip -o ".escapeshellarg($file)." -d ".escapeshellarg($dest)." 2>&1";
+      passthru($cmd, $ret);
     }
-    if ($ret) {
-      $cmd="gunzip ".escapeshellarg($file);
-      exec($cmd, $void, $ret);
+    if (substr($lfile,-3)==".gz") {
+      echo "

"._("Uncompressing through GUNZIP")."

";
+      $cmd="gunzip ".escapeshellarg($file)." 2>&1";
+      passthru($cmd, $ret);
     }
+    echo "
"; if ($ret) { $err->raise("bro",_("I cannot find a way to extract the file %s, it is an unsupported compressed format"), $file); } diff --git a/debian/changelog b/debian/changelog index cab05183..ad7b09d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +alternc (3.1.4) oldstable; urgency=low + + * ensure that values in sub_domaines are prefixed by / for hosting subdomains + * adding enable_original_recipient=no to postfix + * adding tail log view + order by DATE last files in logs + * fix ;;; END ALTERNC zones bug + * proposal (not enabled by default) of error.log per vhost + * default message size limit to 100M, no mailbox size limit in postfix + * fix removal of awstats-package crontab in favor of AlternC's one + * fix unzip/untar/ungzip of files from the browser (double escapeshellarg) + + -- Benjamin Sonntag Mon, 20 Apr 2015 18:00:12 +0200 + alternc (3.1.3) oldstable; urgency=low * fix opendkim listening on *