Skip to content

Commit 9c1b52f

Browse files
author
vogelor
committed
if ISPC uses https, phpmyadmin uses https too
1 parent ec09b18 commit 9c1b52f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

interface/web/sites/database_phpmyadmin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
*/
6666
if($_SESSION["s"]["user"]["typ"] == 'user') {
6767
/* Get the group of the client */
68-
$client_group_id = $_SESSION["s"]["user"]["default_group"];
68+
$client_group_id = intval($_SESSION["s"]["user"]["default_group"]);
6969
/* compare both */
7070
if ($dbData['sys_groupid'] != $client_group_id){
7171
die ("You don't have the right to access this db!");
@@ -75,9 +75,10 @@
7575
/*
7676
* Now generate the login-Form
7777
*/
78+
isset($_SERVER['HTTPS'])? $http = 'https' : $http = 'http';
7879
echo '
7980
starting phpMyAdmin...<br>
80-
<form method="post" action="http://' . $serverData['server_name'] . '/phpmyadmin/index.php" name="login_form" target="_top" style="visibility:hidden">
81+
<form method="post" action="' . $http . '://' . $serverData['server_name'] . '/phpmyadmin/index.php" name="login_form" target="_top" style="visibility:hidden">
8182
<input type="text" name="pma_username" id="input_username" value="' . $dbData['database_user'] . '" />
8283
<input type="password" name="pma_password" id="input_password" value="' . $dbData['database_password'] . '" size="24" class="textfield" />
8384
</form>

0 commit comments

Comments
 (0)