aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
authorPeter Wu2014-07-20 23:48:36 +0200
committerPeter Wu2014-07-20 23:48:36 +0200
commit1a515b1dbf2e31ac5899e829991855f2d218bf3b (patch)
tree3ac490564e3de8949292cdd81d8b9ab4866473b0 /type
parentEscape file argument for rrd_info (diff)
downloadapt-panopticon_cgp-1a515b1dbf2e31ac5899e829991855f2d218bf3b.zip
apt-panopticon_cgp-1a515b1dbf2e31ac5899e829991855f2d218bf3b.tar.gz
apt-panopticon_cgp-1a515b1dbf2e31ac5899e829991855f2d218bf3b.tar.bz2
apt-panopticon_cgp-1a515b1dbf2e31ac5899e829991855f2d218bf3b.tar.xz
Display a HTTP error if the command failed
... for instance, when using an overly large "s" parameter.
Diffstat (limited to 'type')
-rw-r--r--type/Base.class.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/type/Base.class.php b/type/Base.class.php
index 72ce437..c3741bd 100644
--- a/type/Base.class.php
+++ b/type/Base.class.php
@@ -251,7 +251,10 @@ class Type_Base {
251 $shellcmd 251 $shellcmd
252 ); 252 );
253 $shellcmd = implode(' ', $shellcmd); 253 $shellcmd = implode(' ', $shellcmd);
254 passthru($shellcmd); 254 passthru($shellcmd, $exitcode);
255 if ($exitcode !== 0) {
256 header('HTTP/1.1 500 Internal Server Error');
257 }
255 break; 258 break;
256 } 259 }
257 } 260 }