From e6dba7fe7ecebdb6aee2efbcb5aba6800d290b6d Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sun, 24 Nov 2024 07:20:33 -0700 Subject: [PATCH] Handle specialchars in new grouplist.php mods. --- Rocksolid_Light/common/grouplist.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Rocksolid_Light/common/grouplist.php b/Rocksolid_Light/common/grouplist.php index 2c95c76..dff6abf 100644 --- a/Rocksolid_Light/common/grouplist.php +++ b/Rocksolid_Light/common/grouplist.php @@ -64,7 +64,7 @@ echo 'Messages'; echo ''; foreach ($groups_array as $key) { - + $section = $key['section']; $group = $key['group']; $url = $key['url']; @@ -80,7 +80,7 @@ foreach ($groups_array as $key) { echo ''; echo ' ' . $section; echo ''; - echo '' . urldecode($group) . "
\r\n"; + echo '' . htmlspecialchars($group) . "
\r\n"; echo ''; echo '' . $title . ''; echo ''; @@ -89,7 +89,6 @@ foreach ($groups_array as $key) { echo ''; echo ''; - } echo ''; @@ -139,8 +138,8 @@ function build_group_list() $groups_array[$ok_group[0]]['url'] = $menuitem[0] . '/thread.php?group=' . urlencode($ok_group[0]); // Get group title - if (is_file($spooldir . '/' . urldecode($ok_group[0]) . '-title')) { - $title = file_get_contents($spooldir . '/' . urldecode($ok_group[0]) . '-title'); + if (is_file($spooldir . '/' . $ok_group[0] . '-title')) { + $title = file_get_contents($spooldir . '/' . $ok_group[0] . '-title'); $title = strrchr($title, "\t"); } else { $title = ''; @@ -150,7 +149,7 @@ function build_group_list() $groups_array[$ok_group[0]]['group'] = $ok_group[0]; // Get group message qty - fputs($ns, "group " . urldecode($ok_group[0]) . "\r\n"); + fputs($ns, "group " . $ok_group[0] . "\r\n"); $response = line_read($ns); $messages = explode(' ', $response); if (strcmp(substr($response, 0, 3), "211") == 0) { @@ -158,7 +157,6 @@ function build_group_list() } else { $groups_array[$ok_group[0]]['messages'] = 0; } - } } }