From ee2375c0962984cbdf0c05a204e7e8eab8fb279a Mon Sep 17 00:00:00 2001 From: kink Date: Sun, 28 Aug 2005 12:57:57 +0000 Subject: [PATCH] Use shell exec so we can escape the fortune output. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10020 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/fortune/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/fortune/functions.php b/plugins/fortune/functions.php index ec8f4fe9..fe1b9c62 100644 --- a/plugins/fortune/functions.php +++ b/plugins/fortune/functions.php @@ -55,9 +55,9 @@ function fortune_function() { if (!$exist) { printf(_("%s is not found."),$fortune_location); } else { - echo "
" . _("Today's Fortune") . "
\n";
-        htmlspecialchars(system($fortune_command));
-        echo "
\n"; + echo "
" . _("Today's Fortune") . "
\n" .
+            htmlspecialchars(shell_exec($fortune_command)) .
+            "
\n"; } echo ''; @@ -90,4 +90,4 @@ function fortune_function_load() { $fortune_visible = getPref($data_dir, $username, 'fortune_visible'); } -?> \ No newline at end of file +?> -- 2.25.1