die("ERROR 0x02");
//check other args
-if(!preg_match('#^[a-z0-9]*$#i', $_GET['h']))
+if(!preg_match('#^[a-z0-9/.]*$#i', $_GET['h']))
die("ERROR 0x03");
if(!preg_match('#^[a-z0-9]*$#i', $_GET['c']))
die("ERROR 0x04");
---- index.cgi Tue Aug 28 23:20:03 2012
-+++ index-graph.cgi Tue Aug 28 23:21:08 2012
-@@ -4769,8 +4772,15 @@
+--- index.cgi Wed Aug 29 01:30:10 2012
++++ index-graph.cgi Wed Aug 29 00:35:09 2012
+@@ -4769,8 +4772,18 @@
$from = 0 unless defined $from;
$to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to);
my $alternate = 1;
+ my $graph_rand = int(rand(99999));
+
-+ my $head = git_get_head_hash($project);
++ my $head = git_get_head_hash($project);
++ if (!defined $hash) {
++ $hash = $head;
++ }
+ if (!defined $page) {
+ $page = 0;
+ }
for (my $i = $from; $i <= $to; $i++) {
my %co = %{$commitlist->[$i]};
my $commit = $co{'id'};
-@@ -4781,6 +4791,7 @@
+@@ -4781,6 +4794,7 @@
print "<tr class=\"light\">\n";
}
$alternate ^= 1;
-+ print "<td><img class=\"graph\" src=\"git_graph.php?r=".$graph_rand.";p=".$project.";h=".$head.";from=".($from + (100 * $page)).";to=".($to + (100 * $page)).";c=".$commit."\" /></td>";
++ print "<td><img class=\"graph\" src=\"git_graph.php?r=".$graph_rand.";p=".$project.";h=".$hash.";from=".($from + (100 * $page)).";to=".($to + (100 * $page)).";c=".$commit."\" /></td>";
# git_summary() used print "<td><i>$co{'age_string'}</i></td>\n" .
print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
format_author_html('td', \%co, 10) . "<td>";