From 5332bbbdb91f1752eb6a43ddb2b5d1ada97a5f2d Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Mon, 27 Sep 2021 05:08:41 +0000 Subject: [PATCH] Handle attachments with spaces, etc. in file name --- Rocksolid_Light/rocksolid/post.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Rocksolid_Light/rocksolid/post.php b/Rocksolid_Light/rocksolid/post.php index c942c2a..d207c62 100644 --- a/Rocksolid_Light/rocksolid/post.php +++ b/Rocksolid_Light/rocksolid/post.php @@ -230,6 +230,7 @@ if ($type=="post") { } } if(isset($_FILES["photo"]) && $_FILES["photo"]["error"] == 0) { + $_FILES[photo][name] = preg_replace('/[^a-zA-Z0-9\.]/', '_', $_FILES[photo][name]); // There is an attachment to handle $message=message_post_with_attachment(quoted_printable_encode($subject), $nemail." (".quoted_printable_encode($name).")",