From 83d1a3e51a27cd8775cab30f4b6ae53221541f7d Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 25 Jun 2010 10:58:29 +0000 Subject: [PATCH] Run texvc via wfShellExec(), so that execution time is limited. --- RELEASE-NOTES | 1 + includes/Math.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 51495f4634..3c32a06d7e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -92,6 +92,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 21477) \& can now be used in * (bug 11641) \dotsc \dotsm \dotsi \dotso can now be used in * (bug 21475) \mathtt and \textsf can now be used in +* texvc is now run via ulimit4.sh, to limit execution time. === Bug fixes in 1.17 === * (bug 17560) Half-broken deletion moved image files to deletion archive diff --git a/includes/Math.php b/includes/Math.php index be8b87816b..acf110fb09 100644 --- a/includes/Math.php +++ b/includes/Math.php @@ -72,7 +72,7 @@ class MathRenderer { } wfDebug( "TeX: $cmd\n" ); - $contents = `$cmd`; + $contents = wfShellExec( $cmd ); wfDebug( "TeX output:\n $contents\n---\n" ); if (strlen($contents) == 0) { -- 2.20.1