Skip to content

Commit f8317f7

Browse files
author
Till Brehm
committed
Fixed csrf issue when deleting an invoice draft
1 parent ff920a3 commit f8317f7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

server/lib/classes/aps_installer.inc.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,21 @@ private function doInstallation($task, $sxe)
550550
foreach($this->putenv as $var) {
551551
putenv($var);
552552
}
553+
554+
$tmpi = "<?php\n\n";
555+
foreach($this->putenv as $var) {
556+
$tmpi .= "putenv('".$var."');\n";
557+
}
558+
$tmpi .= "chdir('".$this->local_installpath.'install_scripts/'."');\n";
559+
$tmpi .= 'exec("php '.$this->local_installpath.'install_scripts/'.$cfgscript.' install");';
560+
561+
$app->system->file_put_contents($this->local_installpath.'install_scripts/ispinstall.php', $tmpi);
562+
exec('php '.$this->local_installpath.'install_scripts/ispinstall.php');
563+
die();
553564

554565
$shell_retcode = true;
555566
$shell_ret = array();
556-
$app->system->exec_safe('php ? install 2>&1', $this->local_installpath.'install_scripts/'.$cfgscript);
567+
//$app->system->exec_safe('sudo -u ? php ? install 2>&1', $this->file_owner_user, $this->local_installpath.'install_scripts/'.$cfgscript);
557568
$shell_ret = $app->system->last_exec_out();
558569
$shell_retcode = $app->system->last_exec_retcode();
559570
$shell_ret = array_filter($shell_ret);

0 commit comments

Comments
 (0)