From 95ed9b20557ed930d4eed1f3a6db713416f31131 Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Sat, 2 Sep 2023 16:58:52 +0200 Subject: [PATCH 1/2] fix: added missing conversion to HTML entities --- phpmyfaq/admin/ajax.user.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpmyfaq/admin/ajax.user.php b/phpmyfaq/admin/ajax.user.php index eed5638d3c..db512753fa 100644 --- a/phpmyfaq/admin/ajax.user.php +++ b/phpmyfaq/admin/ajax.user.php @@ -66,6 +66,7 @@ $userdata = $user->userdata->get('*'); $userdata['status'] = $user->getStatus(); $userdata['login'] = Strings::htmlentities($user->getLogin()); + $userdata['display_name'] = Strings::htmlentities($userdata['display_name']); $userdata['is_superadmin'] = $user->isSuperAdmin(); $http->sendJsonWithHeaders($userdata); break; From 332d2e4a83251d406ca58dd11c27c598673aa5fa Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Sat, 2 Sep 2023 17:05:31 +0200 Subject: [PATCH 2/2] fix: added missing conversion to HTML entities --- phpmyfaq/admin/ajax.config_list.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpmyfaq/admin/ajax.config_list.php b/phpmyfaq/admin/ajax.config_list.php index a936ef18e9..fbff13109d 100755 --- a/phpmyfaq/admin/ajax.config_list.php +++ b/phpmyfaq/admin/ajax.config_list.php @@ -22,6 +22,7 @@ use phpMyFAQ\Helper\AdministrationHelper; use phpMyFAQ\Helper\LanguageHelper; use phpMyFAQ\Helper\PermissionHelper; +use phpMyFAQ\Strings; use phpMyFAQ\System; use phpMyFAQ\Utils; @@ -95,7 +96,7 @@ function renderInputForm($key, $type) is_numeric($value) ? 'number' : $type, $key, $key, - $value + Strings::htmlentities($value) ); if ('api.apiClientToken' === $key) { echo '
'; @@ -143,7 +144,7 @@ function renderInputForm($key, $type) printf( '', $key, - $faqConfig->get($key) + Strings::htmlentities($faqConfig->get($key)) ); echo "
\n"; break;