Skip to content

Commit 66ddf6a

Browse files
author
Kristan Kenney
committed
Merge branch 'feature/user-roles' into feature/user-auth-log
2 parents 86ba5ba + e8ba376 commit 66ddf6a

File tree

10 files changed

+61
-53
lines changed

10 files changed

+61
-53
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ All notable changes to this project will be documented in this file.
4343
- Fixed xss vulnerability in v-add-sys-ip and user history log (thanks **@numanturle**)
4444
- Fixed remote execution possibility when deleting ssh key (thanks **@numanturle**)
4545

46+
## [1.3.4] - Service Release
47+
### Features
48+
- No new features have been introduced in this release.
49+
50+
### Bugfixes
51+
- Fixed xss vulnerability in v-add-sys-ip and user history log (thanks **@numanturle**)
52+
- Fixed remote execution possibility when deleting ssh key (thanks **@numanturle**)
53+
4654
## [1.3.3] - Service Release
4755
### Bugfixes
4856
- Improved if web folder already exists and do not follow symlink on chmod (thanks @0xGsch and @kikoas1995).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[Hestia Control Panel](https://www.hestiacp.com/)
44
==================================================
5-
**Latest stable release:** Version 1.3.3 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
5+
**Latest stable release:** Version 1.3.4 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
66

77
**Web:** [www.hestiacp.com](https://www.hestiacp.com/)<br>
88
**Documentation:** [docs.hestiacp.com](https://docs.hestiacp.com/)<br>

bin/v-add-sys-filemanager

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ MODE=$1
1919
user="admin"
2020

2121
FM_INSTALL_DIR="$HESTIA/web/fm"
22-
FM_FILE="filegator_v${FM_V}.zip"
23-
FM_URL="https://github.com/filegator/filegator/releases/download/v${FM_V}/${FM_FILE}"
22+
FM_FILE="filegator_v${fm_v}.zip"
23+
FM_URL="https://github.com/filegator/filegator/releases/download/v${fm_v}/${FM_FILE}"
2424
COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
2525

2626

bin/v-delete-sys-filemanager

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ source $HESTIA/conf/hestia.conf
1919

2020
user='admin'
2121
FM_INSTALL_DIR="$HESTIA/web/fm"
22-
FM_V="7.4.1"
2322
COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
2423

2524
#----------------------------------------------------------#

func/upgrade.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ upgrade_roundcube(){
656656
if [ ! -z "$(echo "$WEBMAIL_SYSTEM" | grep -w 'roundcube')" ]; then
657657
rc_version=$(cat /var/lib/roundcube/index.php | grep -o -E '[0-9].[0-9].[0-9]+' | head -1);
658658
if [ "$rc_version" == "$rc_v" ]; then
659-
echo "[ * ] Upgrading RoundCube to version v$rc_v..."
659+
echo "[ * ] Upgrading Roundcube to version v$rc_v..."
660660
$HESTIA/bin/v-add-sys-roundcube
661661
fi
662662
fi
@@ -668,7 +668,7 @@ upgrade_rainloop(){
668668
if [ ! -z "$(echo "$WEBMAIL_SYSTEM" | grep -w 'rainloop')" ]; then
669669
rc_version=$(cat /var/lib/rainloop/data/VERSION);
670670
if [ "$rc_version" == "$rc_v" ]; then
671-
echo "[ * ] Upgrading rainloop to version v$rc_v..."
671+
echo "[ * ] Upgrading Rainloop to version v$rl_v..."
672672
$HESTIA/bin/v-add-sys-rainloop
673673
fi
674674
fi

install/deb/filemanager/install-fm.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ fi
1313
user='admin'
1414
fm_error='no'
1515
source $HESTIA/func/main.sh
16+
source $HESTIA/install/upgrade/upgrade.conf
1617

1718
if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then
1819
echo "Error: Hestia environment vars not present"
@@ -21,9 +22,8 @@ fi
2122

2223
FM_INSTALL_DIR="$HESTIA/web/fm"
2324

24-
FM_V="7.4.1"
25-
FM_FILE="filegator_v${FM_V}.zip"
26-
FM_URL="https://github.com/filegator/filegator/releases/download/v${FM_V}/${FM_FILE}"
25+
FM_FILE="filegator_v${fm_v}.zip"
26+
FM_URL="https://github.com/filegator/filegator/releases/download/v${fm_v}/${FM_FILE}"
2727

2828

2929
COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"

install/upgrade/upgrade.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ UPGRADE_UPDATE_RAINLOOP='true'
3636

3737
# Update the File Manager or it's configuration file
3838
# UPGRADE_UPDATE_FILEMANAGER: Performs an upgrade/repair install of the File Manager
39-
# UPGRADE_UPDATE_FILEMANAGER: Updates only the configuration file
39+
# UPGRADE_UPDATE_FILEMANAGER_CONFIG: Updates only the configuration file
4040
UPGRADE_UPDATE_FILEMANAGER='true'
4141
UPGRADE_UPDATE_FILEMANAGER_CONFIG='false'
4242

@@ -59,4 +59,4 @@ rc_v="1.4.11"
5959
rl_v="1.15.0"
6060

6161
# Set version of File manager to update during upgrade if not already installed
62-
FM_V="7.5.0"
62+
fm_v="7.5.0"

install/upgrade/versions/1.3.4.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Hestia Control Panel upgrade script for target version 1.3.4
4+
5+
#######################################################################################
6+
####### Place additional commands below. #######
7+
#######################################################################################
8+
9+
echo '[ * ] Updating System Administrator account permissions...'
10+
$HESTIA/bin/v-change-user-role admin admin
11+
12+
# Send end-of-life notification to admin user on servers running Ubuntu 16.04
13+
if [ "$OS_TYPE" = "Ubuntu" ]; then
14+
if [ "$OS_VERSION" = '16.04' ]; then
15+
$HESTIA/bin/v-add-user-notification admin 'IMPORTANT: End of support for Ubuntu 16.04 LTS' '<b>Hestia Control Panel no longer supports Ubuntu 16.04 LTS</b>, as a result your server will no longer receive upgrades or security patches after <b>v1.3.4</b>.<br><br>Please upgrade to a supported operating system.'
16+
fi
17+
fi

web/templates/admin/list_db.html

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,24 @@
77
<a href="/add/db/" id="btn-create" class="ui-button cancel" dir="ltr"><i class="fas fa-plus-circle status-icon green"></i><?=_('Add Database')?></a>
88
<? } ?>
99
<?
10-
$mysql = 0;
11-
$pgsql = 0;
12-
1310
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
1411

15-
foreach ($data as $key => $value) {
16-
if ($data[$key]['TYPE'] == 'mysql'){
17-
$mysql = 1;
18-
$db_myadmin_link = "//".$http_host."/phpmyadmin/";
19-
if (!empty($_SESSION['DB_PMA_ALIAS']))
20-
$db_myadmin_link = "//".$http_host."/".$_SESSION['DB_PMA_ALIAS'];
21-
}
22-
if ($data[$key]['TYPE'] == 'pgsql'){
23-
$pgsql = 1;
24-
$db_pgadmin_link = "//".$http_host."/phppgadmin/";
25-
if (!empty($_SESSION['DB_PGA_ALIAS']))
26-
$db_pgadmin_link = "//".$http_host."/".$_SESSION['DB_PGA_ALIAS'];
27-
}
28-
}
29-
if($mysql){
30-
echo '<a class="ui-button cancel" dir="ltr" href="'.$db_myadmin_link.'" target="_blank"><i class="fas fa-database status-icon orange"></i>phpMyAdmin</a>';
12+
$db_myadmin_link = "//".$http_host."/phpmyadmin/";
13+
$db_pgadmin_link = "//".$http_host."/phppgadmin/";
14+
15+
if (!empty($_SESSION['DB_PMA_ALIAS'])) {
16+
$db_myadmin_link = "//".$http_host."/".$_SESSION['DB_PMA_ALIAS']."/";
3117
}
32-
if($pgsql){
33-
echo '<a class="ui-button cancel" dir="ltr" href="'.$db_pgadmin_link.'" target="_blank"><i class="fas fa-database status-icon orange"></i>phpPgAdmin</a>';
18+
if (!empty($_SESSION['DB_PGA_ALIAS'])) {
19+
$db_pgadmin_link = "//".$http_host."/".$_SESSION['DB_PGA_ALIAS']."/";
3420
}
3521
?>
22+
<? if (($_SESSION['DB_SYSTEM'] === 'mysql') || ($_SESSION['DB_SYSTEM'] === 'mysql,pgsql') || ($_SESSION['DB_SYSTEM'] === 'pgsql,mysql')) {?>
23+
<a class="ui-button cancel" dir="ltr" href="<?php echo $db_myadmin_link; ?>" target="_blank"><i class="fas fa-database status-icon orange"></i>phpMyAdmin</a>
24+
<? } ?>
25+
<? if (($_SESSION['DB_SYSTEM'] === 'pgsql') || ($_SESSION['DB_SYSTEM'] === 'mysql,pgsql') || ($_SESSION['DB_SYSTEM'] === 'pgsql,mysql')) {?>
26+
<a class="ui-button cancel" dir="ltr" href="<?php echo $db_pgadmin_link; ?>" target="_blank"><i class="fas fa-database status-icon orange"></i>phpPgAdmin</a>
27+
<? } ?>
3628
</div>
3729
<ul class="context-menu sort-order animated fadeIn" style="display:none;">
3830
<li entity="sort-date" sort_as_int="1"><span class="name active"><?=_('Date')?> <i class="fas fa-sort-amount-down"></i></span><span class="up"><i class="fas fa-sort-amount-up"></i></span></li>

web/templates/user/list_db.html

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,24 @@
33
<div class="l-unit-toolbar__buttonstrip">
44
<a href="/add/db/" id="btn-create" class="ui-button cancel" dir="ltr"><i class="fas fa-plus-circle status-icon green"></i><?=_('Add Database')?></a>
55
<?
6-
$mysql = 0;
7-
$pgsql = 0;
8-
96
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
107

11-
foreach ($data as $key => $value) {
12-
if ($data[$key]['TYPE'] == 'mysql'){
13-
$mysql = 1;
14-
$db_myadmin_link = "//".$http_host."/phpmyadmin/";
15-
if (!empty($_SESSION['DB_PMA_ALIAS']))
16-
$db_myadmin_link = "//".$http_host."/".$_SESSION['DB_PMA_ALIAS'];
17-
}
18-
if ($data[$key]['TYPE'] == 'pgsql'){
19-
$pgsql = 1;
20-
$db_pgadmin_link = "//".$http_host."/phppgadmin/";
21-
if (!empty($_SESSION['DB_PGA_ALIAS']))
22-
$db_pgadmin_link = "//".$http_host."/".$_SESSION['DB_PGA_ALIAS'];
23-
}
24-
}
25-
if($mysql){
26-
echo '<a class="ui-button cancel" dir="ltr" href="'.$db_myadmin_link.'" target="_blank"><i class="fas fa-database status-icon orange"></i>phpMyAdmin</a>';
8+
$db_myadmin_link = "//".$http_host."/phpmyadmin/";
9+
$db_pgadmin_link = "//".$http_host."/phppgadmin/";
10+
11+
if (!empty($_SESSION['DB_PMA_ALIAS'])) {
12+
$db_myadmin_link = "//".$http_host."/".$_SESSION['DB_PMA_ALIAS']."/";
2713
}
28-
if($pgsql){
29-
echo '<a class="ui-button cancel" dir="ltr" href="'.$db_pgadmin_link.'" target="_blank"><i class="fas fa-database status-icon orange"></i>phpPgAdmin</a>';
14+
if (!empty($_SESSION['DB_PGA_ALIAS'])) {
15+
$db_pgadmin_link = "//".$http_host."/".$_SESSION['DB_PGA_ALIAS']."/";
3016
}
3117
?>
18+
<? if (($_SESSION['DB_SYSTEM'] === 'mysql') || ($_SESSION['DB_SYSTEM'] === 'mysql,pgsql') || ($_SESSION['DB_SYSTEM'] === 'pgsql,mysql')) {?>
19+
<a class="ui-button cancel" dir="ltr" href="<?php echo $db_myadmin_link; ?>" target="_blank"><i class="fas fa-database status-icon orange"></i>phpMyAdmin</a>
20+
<? } ?>
21+
<? if (($_SESSION['DB_SYSTEM'] === 'pgsql') || ($_SESSION['DB_SYSTEM'] === 'mysql,pgsql') || ($_SESSION['DB_SYSTEM'] === 'pgsql,mysql')) {?>
22+
<a class="ui-button cancel" dir="ltr" href="<?php echo $db_pgadmin_link; ?>" target="_blank"><i class="fas fa-database status-icon orange"></i>phpPgAdmin</a>
23+
<? } ?>
3224
</div>
3325
<ul class="context-menu sort-order animated fadeIn" style="display:none;">
3426
<li entity="sort-date" sort_as_int="1"><span class="name active"><?=_('Date')?> <i class="fas fa-sort-amount-down"></i></span><span class="up"><i class="fas fa-sort-amount-up"></i></span></li>

0 commit comments

Comments
 (0)