Skip to content

Commit 0d9abe5

Browse files
fortify OpencartSetup (hestiacp#4568)
* fortify OpencartSetup * Run npm run format --------- Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent 6ffb260 commit 0d9abe5

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

web/src/app/WebApp/Installers/Opencart/OpencartSetup.php

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

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

78
class OpencartSetup extends BaseSetup {
89
protected $appInfo = [
@@ -80,16 +81,18 @@ public function install(array $options = null): bool {
8081
"v-run-cli-cmd",
8182
[
8283
"/usr/bin/php" . $options["php_version"],
83-
$this->getDocRoot("/install/cli_install.php"),
84+
quoteshellarg($this->getDocRoot("/install/cli_install.php")),
8485
"install",
85-
"--db_hostname " . $options["database_host"],
86-
"--db_username " . $this->appcontext->user() . "_" . $options["database_user"],
87-
"--db_password " . $options["database_password"],
88-
"--db_database " . $this->appcontext->user() . "_" . $options["database_name"],
89-
"--username " . $options["opencart_account_username"],
90-
"--password " . $options["opencart_account_password"],
91-
"--email " . $options["opencart_account_email"],
92-
"--http_server " . $protocol . $this->domain . "/",
86+
"--db_hostname " . quoteshellarg($options["database_host"]),
87+
"--db_username " .
88+
quoteshellarg($this->appcontext->user() . "_" . $options["database_user"]),
89+
"--db_password " . quoteshellarg($options["database_password"]),
90+
"--db_database " .
91+
quoteshellarg($this->appcontext->user() . "_" . $options["database_name"]),
92+
"--username " . quoteshellarg($options["opencart_account_username"]),
93+
"--password " . quoteshellarg($options["opencart_account_password"]),
94+
"--email " . quoteshellarg($options["opencart_account_email"]),
95+
"--http_server " . quoteshellarg($protocol . $this->domain . "/"),
9396
],
9497
$status,
9598
);

0 commit comments

Comments
 (0)