From a6ee49ab05b7f6ed4b4fd9040cdfd08b1b4e9d61 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sun, 7 May 2023 16:04:05 -0700 Subject: [PATCH] Fix for uploading attachments. --- Rocksolid_Light/rocksolid/lib/post.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rocksolid_Light/rocksolid/lib/post.inc.php b/Rocksolid_Light/rocksolid/lib/post.inc.php index c6aefae..70b0071 100755 --- a/Rocksolid_Light/rocksolid/lib/post.inc.php +++ b/Rocksolid_Light/rocksolid/lib/post.inc.php @@ -410,11 +410,11 @@ function message_post_with_attachment($subject,$from,$newsgroups,$ref,$body,$enc $body.="\r\n--------------".$boundary."\r\n"; fputs($ns,'Message-ID: '.$msgid."\r\n"); if ($userconfig['xface'] !== '' && $myconfig) { - fputs($ns,'X-Face: '.$userconfig[xface]."\r\n"); + fputs($ns,'X-Face: '.$userconfig['xface']."\r\n"); } fputs($ns,'Content-Type: multipart/mixed;boundary="------------'.$boundary.'"'); fputs($ns,"\r\n"); - $contenttype = shell_exec('file -b --mime-type '.$spooldir.'/upload/'.$_FILES[photo][name]); + $contenttype = shell_exec('file -b --mime-type '.$spooldir.'/upload/'.$_FILES['photo']['name']); $contenttype = rtrim($contenttype); $b64file = shell_exec('uuencode -m '.$spooldir.'/upload/'.$_FILES['photo']['name'].' '.$_FILES['photo']['name'].' | grep -v \'begin-base64\|====\''); $body.='Content-Type: '.$contenttype.';';