|
3 | 3 | namespace Hestia\WebApp\Installers\Drupal; |
4 | 4 |
|
5 | 5 | use Hestia\WebApp\Installers\BaseSetup as BaseSetup; |
| 6 | +use function Hestiacp\quoteshellarg\quoteshellarg; |
6 | 7 |
|
7 | 8 | class DrupalSetup extends BaseSetup { |
8 | 9 | protected $appname = "drupal"; |
@@ -61,28 +62,28 @@ public function install(array $options = null): bool { |
61 | 62 | "v-run-cli-cmd", |
62 | 63 | [ |
63 | 64 | "/usr/bin/php" . $options["php_version"], |
64 | | - $this->getDocRoot("/vendor/drush/drush/drush"), |
| 65 | + quoteshellarg($this->getDocRoot("/vendor/drush/drush/drush")), |
65 | 66 | "site-install", |
66 | 67 | "standard", |
67 | | - "--db-url=mysql://" . |
68 | | - $this->appcontext->user() . |
69 | | - "_" . |
70 | | - $options["database_user"] . |
71 | | - ":" . |
72 | | - $options["database_password"] . |
73 | | - "@" . |
74 | | - $options["database_host"] . |
75 | | - ":3306/" . |
76 | | - $this->appcontext->user() . |
77 | | - "_" . |
78 | | - $options["database_name"] . |
79 | | - "", |
80 | | - "--account-name=" . |
81 | | - $options["username"] . |
82 | | - " --account-pass=" . |
83 | | - $options["password"], |
| 68 | + "--db-url=" . |
| 69 | + quoteshellarg( |
| 70 | + "mysql://" . |
| 71 | + $this->appcontext->user() . |
| 72 | + "_" . |
| 73 | + $options["database_user"] . |
| 74 | + ":" . |
| 75 | + $options["database_password"] . |
| 76 | + "@" . |
| 77 | + $options["database_host"] . |
| 78 | + ":3306/" . |
| 79 | + $this->appcontext->user() . |
| 80 | + "_" . |
| 81 | + $options["database_name"], |
| 82 | + ), |
| 83 | + "--account-name=" . quoteshellarg($options["username"]), |
| 84 | + "--account-pass=" . quoteshellarg($options["password"]), |
84 | 85 | "--site-name=Drupal", |
85 | | - "--site-mail=" . $options["email"], |
| 86 | + "--site-mail=" . quoteshellarg($options["email"]), |
86 | 87 | ], |
87 | 88 | $status, |
88 | 89 | ); |
|
0 commit comments