diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php
index 498ce1e770..d7ccb5fc15 100644
--- a/libraries/server_privileges.lib.php
+++ b/libraries/server_privileges.lib.php
@@ -1742,7 +1742,7 @@ function PMA_getStandardLinks($conditional_class)
* @return array $extra_data
*/
function PMA_getExtraDataForAjaxBehavior($password, $link_export, $sql_query,
- $link_edit, $dbname_is_wildcard
+ $link_edit, $dbname_is_wildcard, $hostname, $username
) {
if (strlen($sql_query)) {
$extra_data['sql_query']
@@ -1756,14 +1756,14 @@ function PMA_getExtraDataForAjaxBehavior($password, $link_export, $sql_query,
$new_user_string = '
'."\n"
. '| '
+ . htmlspecialchars($username)
+ . '' . htmlspecialchars($hostname) . '" />'
. ' | ' . "\n"
. ' | ' . "\n"
- . '' . htmlspecialchars($_REQUEST['hostname']) . ' | ' . "\n";
+ : htmlspecialchars($username) ) . '' . "\n"
+ . '' . htmlspecialchars($hostname) . ' | ' . "\n";
$new_user_string .= '';
@@ -1791,15 +1791,15 @@ function PMA_getExtraDataForAjaxBehavior($password, $link_export, $sql_query,
$new_user_string .= ' | '
. sprintf($link_edit,
- urlencode($_REQUEST['username']),
- urlencode($_REQUEST['hostname']),
+ urlencode($username),
+ urlencode($hostname),
'', ''
)
. ' | ' . "\n";
$new_user_string .= ''
. sprintf($link_export,
- urlencode($_REQUEST['username']),
- urlencode($_REQUEST['hostname']),
+ urlencode($username),
+ urlencode($hostname),
(isset($_GET['initial']) ? $_GET['initial'] : '')
)
. ' | ' . "\n";
@@ -1812,7 +1812,7 @@ function PMA_getExtraDataForAjaxBehavior($password, $link_export, $sql_query,
* Generate the string for this alphabet's initial, to update the user
* pagination
*/
- $new_user_initial = strtoupper(substr($_REQUEST['username'], 0, 1));
+ $new_user_initial = strtoupper(substr($username, 0, 1));
$new_user_initial_string = ''
. $new_user_initial . '';
diff --git a/server_privileges.php b/server_privileges.php
index 0ade132140..95211eabd0 100644
--- a/server_privileges.php
+++ b/server_privileges.php
@@ -379,7 +379,8 @@ if ($GLOBALS['is_ajax_request']
$isPass = true;
}
$extra_data = PMA_getExtraDataForAjaxBehavior($isPass, $link_export,
- (isset($sql_query) ? $sql_query : ''), $link_edit, $dbname_is_wildcard
+ (isset($sql_query) ? $sql_query : ''), $link_edit, $dbname_is_wildcard,
+ $hostname, $username
);
if ($message instanceof PMA_Message) {