diff --git a/filter/tex/texdebug.php b/filter/tex/texdebug.php
index b4426df9fe2..fdb2d839e7e 100644
--- a/filter/tex/texdebug.php
+++ b/filter/tex/texdebug.php
@@ -82,7 +82,11 @@
// Action: Show Tex command line output
if ($action=='ShowOutputTex') {
- TexOutput($texexp);
+ if (debugging()) {
+ TexOutput($texexp);
+ } else {
+ echo "Can not output detailed information due to security concerns, please turn on debug mode first.";
+ }
exit;
}
@@ -140,7 +144,7 @@
if (file_exists($pathname)) {
send_file($pathname, $image);
- } else {
+ } else if (debugging()) {
$ecmd = "$cmd 2>&1";
echo `$ecmd` . "
\n";
echo "The shell command
$cmd
returned status = $status
\n";
@@ -166,6 +170,8 @@
echo "mimetex executable $commandpath not found!
";
}
echo "Image not found!";
+ } else {
+ echo "Can not output detailed information due to security concerns, please turn on debug mode first.";
}
}
@@ -284,18 +290,18 @@
The following tests are available: