admin/commits: test for popen availability
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 20 Apr 2018 13:59:43 +0000 (15:59 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 20 Apr 2018 13:59:43 +0000 (15:59 +0200)
System calls can be disabled in PHP ini.

admin/commits.php

index 11aae67c320ac6f2ac082a3a54b64d2761db75d5..2543d79463637ef8a984ffcb721a9b7e67d4c2f8 100644 (file)
@@ -1,4 +1,9 @@
 <?php
+if (!function_exists('popen')) {
+       print "<p>Niet beschikbaar op deze server!</p>\n";
+       return;
+}
+
 $pagesize = intval(@$_GET['pagesize']) ?: 20;
 $gitcmd = "git log -n $pagesize --pretty='%at\t%an\t%s'";