Skip to content

Commit b7f9032

Browse files
Fix hestiacp#1825 PMA Support not working (hestiacp#1901)
* Fix bug preventing upgrade pma when postgesql is enabeled * Fix hestiacp#1825 Make /phpmyadmin/ url in pma script * Update upgrade script * Update changelog Co-authored-by: Raphael Schneeberger <rs@scit.ch>
1 parent d3fdd6e commit b7f9032

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
66
### Features
77

88
- Include DMARC record in DNS record list #1836
9+
- Enabled phpMyAdmin Single Sign On support
910
- Add command to add / delete from API_ALLOWED_IP list (#1904)
1011

1112
### Bugfixes
@@ -19,6 +20,7 @@ All notable changes to this project will be documented in this file.
1920
- Increased minimal memory requirements for ClamD / ClamAV. #1840
2021
- Restore of backup did not rebuild the "Forced SSL" and "HSTS" config on new account #1862
2122
- Keep changes made by /install/upgrade/manual/install_awstats_geopip.sh on update HestiaCP (via Discord)
23+
- Fixed an issue where phpmyadmin did not update when Postgresql was availble.
2224

2325
## [1.4.2] - Service release
2426

func/upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ upgrade_start_routine() {
474474
upgrade_phpmyadmin() {
475475
if [ "$UPGRADE_UPDATE_PHPMYADMIN" = "true" ]; then
476476
# Check if MariaDB/MySQL is installed on the server before attempting to install or upgrade phpMyAdmin
477-
if [ "$DB_SYSTEM" = "mysql" ]; then
477+
if [ ! -z "$(echo $DB_SYSTEM | grep -w 'mysql')" ]; then
478478
# Define version check function
479479
function version_ge(){ test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" -o ! -z "$1" -a "$1" = "$2"; }
480480

install/deb/phpmyadmin/hestia-sso.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function session_invalid(){
118118
//delete all current sessions
119119
session_destroy();
120120
setcookie($session_name, null, -1, '/');
121-
header('Location: /phpmyadmin/index.php');
121+
header("Location: " . dirname($_SERVER['PHP_SELF']) . "/index.php");
122122
die();
123123
}
124124
$api = new Hestia_API();
@@ -127,6 +127,8 @@ function session_invalid(){
127127
$api -> delete_temp_user($_SESSION['HESTIA_sso_database'], $_SESSION['HESTIA_sso_user'], $_SESSION['PMA_single_signon_user'], $_SESSION['HESTIA_sso_host']);
128128
//remove sessin
129129
session_invalid();
130+
header("Location: " . dirname($_SERVER['PHP_SELF']) . "/index.php");
131+
die();
130132
}else{
131133
if(isset($_GET['user']) && isset($_GET['hestia_token'])){
132134
$database = $_GET['database'];
@@ -153,15 +155,19 @@ function session_invalid(){
153155

154156
@session_write_close();
155157
setcookie($session_name, $id , 0, "/");
156-
header('Location: /phpmyadmin/index.php');
158+
header("Location: " . dirname($_SERVER['PHP_SELF']) . "/index.php");
157159
die();
158160
}
159161
}else{
160162
session_invalid();
163+
header("Location: " . dirname($_SERVER['PHP_SELF']) . "/index.php");
164+
die();
161165
}
162166
}
163167
}
164168
}else{
165169
session_invalid();
170+
header("Location: " . dirname($_SERVER['PHP_SELF']) . "/index.php");
171+
die();
166172
}
167173
?>

install/upgrade/versions/1.4.3.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ if [ "$FIREWALL_SYSTEM" = "iptables" ]; then
1111
echo "[ * ] Fix the issue of generate firewall rules..."
1212
$BIN/v-update-firewall
1313
fi
14+
15+
# Reset PMA SSO
16+
if [ "$PHPMYADMIN_KEY" != "" ]; then
17+
echo "[ * ] Refressh hestia-sso for PMA..."
18+
$BIN/v-delete-sys-pma-sso
19+
$BIN/v-add-sys-pma-sso
20+
fi

web/templates/pages/edit_server.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,7 @@
502502
<br><br>
503503
</td>
504504
</tr>
505-
<?php if ($_SESSION['POLICY_SYSTEM_ENABLE_BACON'] === 'true' && 1 != 1) {
506-
//disable for 1.4.0 release due some bugs
505+
<?php if ($_SESSION['POLICY_SYSTEM_ENABLE_BACON'] === 'true') {
507506
?>
508507
<tr>
509508
<td class="vst-text">

web/templates/pages/list_server_preview.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
</div>
2525
</div>
2626
<!-- Start of item element-->
27-
<!--
2827
<div class="l-unit header animated fadeIn">
2928
<div class="l-unit__col l-unit__col--right">
3029
<div class="clearfix l-unit__stat-col--left super-compact text-center">
@@ -35,7 +34,6 @@
3534
<div class="clearfix l-unit__stat-col--left wide-2">In final development stages.</div>
3635
</div>
3736
</div>
38-
-->
3937
<!-- End of item element-->
4038
<!-- Start of item element-->
4139
<div class="l-unit header animated fadeIn">

0 commit comments

Comments
 (0)