From 7b234ebc82b91e21c9899fcecf588ae7e56e9be0 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Fri, 1 Mar 2024 18:39:12 -0700 Subject: [PATCH] Check if logged in before trying to display username in files.php. --- Rocksolid_Light/spoolnews/files.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Rocksolid_Light/spoolnews/files.php b/Rocksolid_Light/spoolnews/files.php index 22c7df3..c7ae9ab 100644 --- a/Rocksolid_Light/spoolnews/files.php +++ b/Rocksolid_Light/spoolnews/files.php @@ -18,8 +18,8 @@ if ((isset($_REQUEST['command']) && $_REQUEST['command'] == 'Show') && password_ header('Content-type: ' . $_REQUEST['contenttype']); header('Content-disposition: filename="' . $_REQUEST['showfilename'] . '"'); file_put_contents($logfile, "\n" . format_log_date() . " Requesting: " . $_REQUEST['showfile'], FILE_APPEND); - - echo $getfile; + echo file_get_contents($getfilename); + //echo $getfile; exit(0); } $title .= ' - Browse files'; @@ -33,7 +33,10 @@ if (disable_page_by_user_agent($client_device, "bot", "Files")) { echo '

'; echo 'files / '; -echo htmlspecialchars($_COOKIE['mail_name']) . '

'; +if(isset($_COOKIE['mail_name'])) { + echo htmlspecialchars($_COOKIE['mail_name']); +} +echo ''; echo ''; // Browse button echo '
';