Skip to content

Commit 70f282a

Browse files
author
Kristan Kenney
committed
Merge branch 'main' into feature/user-roles
1 parent c8f2876 commit 70f282a

File tree

6 files changed

+72
-24
lines changed

6 files changed

+72
-24
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ All notable changes to this project will be documented in this file.
4545
- Disabled changing backup folder via Web UI because it used symbolic link instead of mount causing issues with restore mail / user files.
4646
- Fixed XSS vulnerability in `v-add-sys-ip` and user history log (thanks **@numanturle**).
4747
- Fixed remote code execution vulnerability which could occur when deleting SSH keys (thanks **@numanturle**).
48+
- Fixed vulnerability in v-update-sys-hestia (thanks **@numanturle**)
4849
- Improve how Quick install of web apps are handled and allow users added apps to be maintained in list view.
50+
- Add Drupal quick installer
51+
- Add Nextcloud quick installer
4952

5053
## [1.3.5] - Service Release
5154
### Features

install/deb/filemanager/filegator/composer.lock

Lines changed: 23 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/deb/nginx/nginx.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ http {
8585
set_real_ip_from 103.21.244.0/22;
8686
set_real_ip_from 103.22.200.0/22;
8787
set_real_ip_from 103.31.4.0/22;
88-
set_real_ip_from 104.16.0.0/12;
88+
set_real_ip_from 104.16.0.0/13;
89+
set_real_ip_from 104.24.0.0/14;
8990
set_real_ip_from 108.162.192.0/18;
9091
set_real_ip_from 131.0.72.0/22;
9192
set_real_ip_from 141.101.64.0/18;

install/upgrade/versions/1.4.0.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ if [ -e "/etc/nginx/nginx.conf" ]; then
1515
fi
1616
fi
1717

18+
if [ -e "/etc/nginx/nginx.conf" ]; then
19+
echo "[ * ] Update Nginx.conf with changes to Cloudflare IP addresses"
20+
sed -i 's/ set_real_ip_from 104.16.0.0\/12;/ set_real_ip_from 104.16.0.0\/13;\n set_real_ip_from 104.24.0.0\/14;/g' /etc/nginx/nginx.conf
21+
fi
22+
1823
# Populating HELO/SMTP Banner for existing IPs
1924
if [ "$MAIL_SYSTEM" == "exim4" ]; then
2025

@@ -38,7 +43,7 @@ if [ "$MAIL_SYSTEM" == "exim4" ]; then
3843
echo "[ * ] Updating exim4 configuration..."
3944

4045
# Add new smtp_active_hostname variable to exim config
41-
sed -i '/^smtp_banner = \$smtp_active_hostname$/a smtp_active_hostname = ${if exists {\/etc\/exim4\/mailhelo.conf}{${lookup{$interface_address}lsearch{\/etc\/exim4\/mailhelo.conf}{$value}{$primary_hostname}}}{$primary_hostname}}"' /etc/exim4/exim4.conf.template
46+
sed -i '/^smtp_banner = \$smtp_active_hostname$/a smtp_active_hostname = ${if exists {\/etc\/exim4\/mailhelo.conf}{${lookup{$interface_address}lsearch{\/etc\/exim4\/mailhelo.conf}{$value}{$primary_hostname}}}{$primary_hostname}}' /etc/exim4/exim4.conf.template
4247

4348
# Lookup HELO address by sending ip instead of sending domain
4449
sed -i 's/helo_data = \${if exists {\/etc\/exim4\/mailhelo.conf}{${lookup{\$sender_address_domain}lsearch\*{\/etc\/exim4\/mailhelo.conf}{\$value}{\$primary_hostname}}}{\$primary_hostname}}/helo_data = ${if exists {\/etc\/exim4\/mailhelo.conf}{${lookup{$sending_ip_address}lsearch{\/etc\/exim4\/mailhelo.conf}{$value}{$primary_hostname}}}{$primary_hostname}}/' /etc/exim4/exim4.conf.template
@@ -151,6 +156,16 @@ rm -rf $HESTIA/data/templates/web/nginx/php-fpm/drupal8.*tpl
151156
rm -rf $HESTIA/data/templates/web/nginx/php-fpm/codeigniter2.*tpl
152157
rm -rf $HESTIA/data/templates/web/nginx/php-fpm/codeigniter3.*tpl
153158

159+
# Clean up old Hestia controled webapps
160+
if [ -d "$HESTIA/web/images/webapps/" ]; then
161+
echo "[ * ] Clean up old web apps code..."
162+
rm -rf $HESTIA/web/images/webapps/
163+
rm -rf $HESTIA/web/src/app/WebApp/Installers/LaravelSetup.php
164+
rm -rf $HESTIA/web/src/app/WebApp/Installers/OpencartSetup.php
165+
rm -rf $HESTIA/web/src/app/WebApp/Installers/PrestashopSetup.php
166+
rm -rf $HESTIA/web/src/app/WebApp/Installers/SymfonySetup.php
167+
rm -rf $HESTIA/web/src/app/WebApp/Installers/WordpressSetup.php
168+
fi
154169

155170

156171
##### COMMANDS FOR V1.5.X

web/list/server/index.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
foreach($output as $file) {
2020
echo $file . "\n";
2121
}
22-
echo " </pre>\n</body>\n</html>\n";
22+
echo " </pre>\n</div>\n</body>\n</html>\n";
2323
exit();
2424
}
2525

@@ -31,7 +31,7 @@
3131
foreach($output as $file) {
3232
echo $file . "\n";
3333
}
34-
echo " </pre>\n</body>\n</html>\n";
34+
echo " </pre>\n</div>\n</body>\n</html>\n";
3535
exit();
3636
}
3737

@@ -43,7 +43,7 @@
4343
foreach($output as $file) {
4444
echo $file . "\n";
4545
}
46-
echo " </pre>\n</body>\n</html>\n";
46+
echo " </pre>\n</div>\n</body>\n</html>\n";
4747
exit();
4848
}
4949

@@ -55,7 +55,7 @@
5555
foreach($output as $file) {
5656
echo $file . "\n";
5757
}
58-
echo " </pre>\n</body>\n</html>\n";
58+
echo " </pre>\n</div>\n</body>\n</html>\n";
5959
exit();
6060
}
6161

@@ -68,14 +68,13 @@
6868
$file=str_replace('border="0"', 'border="1"', $file);
6969
$file=str_replace('bgcolor="#ffffff"', '', $file);
7070
$file=str_replace('bgcolor="#000000"', 'bgcolor="#282828"', $file);
71-
71+
7272
echo $file . "\n";
7373
}
74-
echo " </pre>\n</body>\n</html>\n";
74+
echo " </pre>\n</div>\n</body>\n</html>\n";
7575
exit();
7676
}
7777

78-
7978
// DNS info
8079
if (isset($_GET['dns'])) {
8180
$TAB = 'DNS';
@@ -84,7 +83,7 @@
8483
foreach($output as $file) {
8584
echo $file . "\n";
8685
}
87-
echo " </pre>\n</body>\n</html>\n";
86+
echo " </pre>\n</div>\n</body>\n</html>\n";
8887
exit();
8988
}
9089

@@ -98,7 +97,7 @@
9897
echo $file . "\n";
9998
}
10099
}
101-
echo " </pre>\n</body>\n</html>\n";
100+
echo " </pre>\n</div>\n</body>\n</html>\n";
102101
exit();
103102
}
104103

@@ -112,7 +111,7 @@
112111
echo $file . "\n";
113112
}
114113
}
115-
echo " </pre>\n</body>\n</html>\n";
114+
echo " </pre>\n</div>\n</body>\n</html>\n";
116115
exit();
117116
}
118117

web/src/app/WebApp/Installers/Drupal/DrupalSetup.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,38 @@ class DrupalSetup extends BaseSetup {
1111
protected $appInfo = [
1212
'name' => 'Drupal',
1313
'group' => 'cms',
14-
'enabled' => false,
14+
'enabled' => 'yes',
1515
'version' => 'latest',
1616
'thumbnail' => 'drupal-thumb.png'
1717
];
1818

1919
protected $config = [
2020
'form' => [
21+
'username' => ['type'=>'text', 'value'=>'admin'],
22+
'password' => 'password',
23+
'email' => 'text'
2124
],
2225
'database' => true,
2326
'resources' => [
24-
27+
'composer' => [ 'src' => 'drupal/recommended-project', 'dst' => '/' ],
2528
],
2629
];
2730

2831
public function install(array $options=null) : bool
2932
{
30-
exit( "Installer missing" );
33+
parent::install($options);
34+
$this->appcontext->runComposer(["require", "-d " . $this->getDocRoot(), "drush/drush:^10"], $result);
35+
36+
$this -> appcontext -> runUser('v-run-cli-cmd', [
37+
'php',
38+
$this -> getDocRoot('/vendor/drush/drush/drush'),
39+
'site-install',
40+
'standard',
41+
'--db-url=mysql://'.$this->appcontext->user() . '_' . $options['database_user'].':' . $options['database_password'].'@localhost:3306/'.$this->appcontext->user() . '_' . $options['database_name'].'',
42+
'--account-name='.$options['username'].' --account-pass='.$options['password'],
43+
'--site-name=Drupal',
44+
'--site-mail='.$options['email']
45+
], $status);
46+
return ($status->code === 0);
3147
}
3248
}

0 commit comments

Comments
 (0)