Skip to content

Commit 6ffb260

Browse files
fortify PrestashopSetup (hestiacp#4569)
* fortify PrestashopSetup * Run NPM format --------- Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent 55ae89c commit 6ffb260

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

web/src/app/WebApp/Installers/Prestashop/PrestashopSetup.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Hestia\WebApp\Installers\Prestashop;
44

55
use Hestia\WebApp\Installers\BaseSetup as BaseSetup;
6+
use function Hestiacp\quoteshellarg\quoteshellarg;
67

78
class PrestashopSetup extends BaseSetup {
89
protected $appInfo = [
@@ -71,17 +72,19 @@ public function install(array $options = null): bool {
7172
"v-run-cli-cmd",
7273
[
7374
"/usr/bin/php" . $options["php_version"],
74-
$this->getDocRoot("/install/index_cli.php"),
75-
"--db_server=" . $options["database_host"],
76-
"--db_user=" . $this->appcontext->user() . "_" . $options["database_user"],
77-
"--db_password=" . $options["database_password"],
78-
"--db_name=" . $this->appcontext->user() . "_" . $options["database_name"],
79-
"--firstname=" . $options["prestashop_account_first_name"],
80-
"--lastname=" . $options["prestashop_account_last_name"],
81-
"--password=" . $options["prestashop_account_password"],
82-
"--email=" . $options["prestashop_account_email"],
83-
"--domain=" . $this->domain,
84-
"--ssl=" . $ssl_enabled,
75+
quoteshellarg($this->getDocRoot("/install/index_cli.php")),
76+
"--db_server=" . quoteshellarg($options["database_host"]),
77+
"--db_user=" .
78+
quoteshellarg($this->appcontext->user() . "_" . $options["database_user"]),
79+
"--db_password=" . quoteshellarg($options["database_password"]),
80+
"--db_name=" .
81+
quoteshellarg($this->appcontext->user() . "_" . $options["database_name"]),
82+
"--firstname=" . quoteshellarg($options["prestashop_account_first_name"]),
83+
"--lastname=" . quoteshellarg($options["prestashop_account_last_name"]),
84+
"--password=" . quoteshellarg($options["prestashop_account_password"]),
85+
"--email=" . quoteshellarg($options["prestashop_account_email"]),
86+
"--domain=" . quoteshellarg($this->domain),
87+
"--ssl=" . (int) $ssl_enabled,
8588
],
8689
$status,
8790
);

0 commit comments

Comments
 (0)