Skip to content

Commit b91779f

Browse files
committed
Git 1.7.2.5
Signed-off-by: Junio C Hamano <[email protected]>
2 parents 2850c1a + 9db41eb commit b91779f

File tree

9 files changed

+111
-19
lines changed

9 files changed

+111
-19
lines changed

Documentation/RelNotes/1.6.4.5.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Git v1.6.4.5 Release Notes
2+
==========================
3+
4+
Fixes since v1.6.4.4
5+
--------------------
6+
7+
* Simplified base85 implementation.
8+
9+
* An overlong line after ".gitdir: " in a git file caused out of bounds
10+
access to an array on the stack.
11+
12+
* "git count-objects" did not handle packs larger than 4G.
13+
14+
* "git rev-parse --parseopt --stop-at-non-option" did not stop at non option
15+
when --keep-dashdash was in effect.
16+
17+
* "gitweb" can sometimes be tricked into parrotting a filename argument
18+
given in a request without properly quoting.
19+
20+
Other minor fixes and documentation updates are included.

Documentation/RelNotes/1.6.5.9.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Git v1.6.5.9 Release Notes
2+
==========================
3+
4+
Fixes since v1.6.5.8
5+
--------------------
6+
7+
* An overlong line after ".gitdir: " in a git file caused out of bounds
8+
access to an array on the stack.
9+
10+
* "git blame -L $start,$end" segfaulted when too large $start was given.
11+
12+
* "git rev-parse --parseopt --stop-at-non-option" did not stop at non option
13+
when --keep-dashdash was in effect.
14+
15+
* "gitweb" can sometimes be tricked into parrotting a filename argument
16+
given in a request without properly quoting.
17+
18+
Other minor fixes and documentation updates are included.

Documentation/RelNotes/1.6.6.3.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Git v1.6.6.3 Release Notes
2+
==========================
3+
4+
Fixes since v1.6.6.2
5+
--------------------
6+
7+
* An overlong line after ".gitdir: " in a git file caused out of bounds
8+
access to an array on the stack.
9+
10+
* "git bisect $path" did not correctly diagnose an error when given a
11+
non-existent path.
12+
13+
* "git blame -L $start,$end" segfaulted when too large $start was given.
14+
15+
* "git imap-send" did not write draft box with CRLF line endings per RFC.
16+
17+
* "git rev-parse --parseopt --stop-at-non-option" did not stop at non option
18+
when --keep-dashdash was in effect.
19+
20+
* "gitweb" can sometimes be tricked into parrotting a filename argument
21+
given in a request without properly quoting.
22+
23+
Other minor fixes and documentation updates are included.

Documentation/RelNotes/1.7.0.9.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Git v1.7.0.9 Release Notes
2+
==========================
3+
4+
Fixes since v1.7.0.8
5+
--------------------
6+
7+
* "gitweb" can sometimes be tricked into parrotting a filename argument
8+
given in a request without properly quoting.

Documentation/RelNotes/1.7.1.4.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Git v1.7.1.4 Release Notes
2+
==========================
3+
4+
Fixes since v1.7.1.3
5+
--------------------
6+
7+
* "gitweb" can sometimes be tricked into parrotting a filename argument
8+
given in a request without properly quoting.

Documentation/RelNotes/1.7.2.5.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Git v1.7.2.5 Release Notes
2+
==========================
3+
4+
Fixes since v1.7.2.4
5+
--------------------
6+
7+
* "gitweb" can sometimes be tricked into parrotting a filename argument
8+
given in a request without properly quoting.

GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
GVF=GIT-VERSION-FILE
4-
DEF_VER=v1.7.2.4
4+
DEF_VER=v1.7.2.5
55

66
LF='
77
'

RelNotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Documentation/RelNotes/1.7.2.4.txt
1+
Documentation/RelNotes/1.7.2.5.txt

gitweb/gitweb.perl

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,13 @@ sub esc_url {
13321332
return $str;
13331333
}
13341334

1335+
# quote unsafe characters in HTML attributes
1336+
sub esc_attr {
1337+
1338+
# for XHTML conformance escaping '"' to '&quot;' is not enough
1339+
return esc_html(@_);
1340+
}
1341+
13351342
# replace invalid utf8 character with SUBSTITUTION sequence
13361343
sub esc_html {
13371344
my $str = shift;
@@ -1737,7 +1744,7 @@ sub format_ref_marker {
17371744
hash=>$dest
17381745
)}, $name);
17391746

1740-
$markers .= " <span class=\"$class\" title=\"$ref\">" .
1747+
$markers .= " <span class=\"".esc_attr($class)."\" title=\"".esc_attr($ref)."\">" .
17411748
$link . "</span>";
17421749
}
17431750
}
@@ -1821,7 +1828,7 @@ sub git_get_avatar {
18211828
return $pre_white .
18221829
"<img width=\"$size\" " .
18231830
"class=\"avatar\" " .
1824-
"src=\"$url\" " .
1831+
"src=\"".esc_url($url)."\" " .
18251832
"alt=\"\" " .
18261833
"/>" . $post_white;
18271834
} else {
@@ -2532,7 +2539,7 @@ sub git_show_project_tagcloud {
25322539
} else {
25332540
my @tags = sort { $cloud->{$a}->{count} <=> $cloud->{$b}->{count} } keys %$cloud;
25342541
return '<p align="center">' . join (', ', map {
2535-
"<a href=\"$home_link?by_tag=$_\">$cloud->{$_}->{topname}</a>"
2542+
$cgi->a({-href=>"$home_link?by_tag=$_"}, $cloud->{$_}->{topname})
25362543
} splice(@tags, 0, $count)) . '</p>';
25372544
}
25382545
}
@@ -3429,11 +3436,11 @@ sub git_header_html {
34293436
# print out each stylesheet that exist, providing backwards capability
34303437
# for those people who defined $stylesheet in a config file
34313438
if (defined $stylesheet) {
3432-
print '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'"/>'."\n";
3439+
print '<link rel="stylesheet" type="text/css" href="'.esc_url($stylesheet).'"/>'."\n";
34333440
} else {
34343441
foreach my $stylesheet (@stylesheets) {
34353442
next unless $stylesheet;
3436-
print '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'"/>'."\n";
3443+
print '<link rel="stylesheet" type="text/css" href="'.esc_url($stylesheet).'"/>'."\n";
34373444
}
34383445
}
34393446
if (defined $project) {
@@ -3446,7 +3453,7 @@ sub git_header_html {
34463453
my $type = lc($format);
34473454
my %link_attr = (
34483455
'-rel' => 'alternate',
3449-
'-title' => "$project - $href_params{'-title'} - $format feed",
3456+
'-title' => esc_attr("$project - $href_params{'-title'} - $format feed"),
34503457
'-type' => "application/$type+xml"
34513458
);
34523459

@@ -3473,13 +3480,13 @@ sub git_header_html {
34733480
} else {
34743481
printf('<link rel="alternate" title="%s projects list" '.
34753482
'href="%s" type="text/plain; charset=utf-8" />'."\n",
3476-
$site_name, href(project=>undef, action=>"project_index"));
3483+
esc_attr($site_name), href(project=>undef, action=>"project_index"));
34773484
printf('<link rel="alternate" title="%s projects feeds" '.
34783485
'href="%s" type="text/x-opml" />'."\n",
3479-
$site_name, href(project=>undef, action=>"opml"));
3486+
esc_attr($site_name), href(project=>undef, action=>"opml"));
34803487
}
34813488
if (defined $favicon) {
3482-
print qq(<link rel="shortcut icon" href="$favicon" type="image/png" />\n);
3489+
print qq(<link rel="shortcut icon" href=").esc_url($favicon).qq(" type="image/png" />\n);
34833490
}
34843491

34853492
print "</head>\n" .
@@ -3492,7 +3499,7 @@ sub git_header_html {
34923499
print "<div class=\"page_header\">\n" .
34933500
$cgi->a({-href => esc_url($logo_url),
34943501
-title => $logo_label},
3495-
qq(<img src="$logo" width="72" height="27" alt="git" class="logo"/>));
3502+
qq(<img src=").esc_url($logo).qq(" width="72" height="27" alt="git" class="logo"/>));
34963503
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
34973504
if (defined $project) {
34983505
print $cgi->a({-href => href(action=>"summary")}, esc_html($project));
@@ -3590,7 +3597,7 @@ sub git_footer_html {
35903597
insert_file($site_footer);
35913598
}
35923599

3593-
print qq!<script type="text/javascript" src="$javascript"></script>\n!;
3600+
print qq!<script type="text/javascript" src="!.esc_url($javascript).qq!"></script>\n!;
35943601
if (defined $action &&
35953602
$action eq 'blame_incremental') {
35963603
print qq!<script type="text/javascript">\n!.
@@ -5610,14 +5617,14 @@ sub git_blob {
56105617
} else {
56115618
print "<div class=\"page_nav\">\n" .
56125619
"<br/><br/></div>\n" .
5613-
"<div class=\"title\">$hash</div>\n";
5620+
"<div class=\"title\">".esc_html($hash)."</div>\n";
56145621
}
56155622
git_print_page_path($file_name, "blob", $hash_base);
56165623
print "<div class=\"page_body\">\n";
56175624
if ($mimetype =~ m!^image/!) {
5618-
print qq!<img type="$mimetype"!;
5625+
print qq!<img type="!.esc_attr($mimetype).qq!"!;
56195626
if ($file_name) {
5620-
print qq! alt="$file_name" title="$file_name"!;
5627+
print qq! alt="!.esc_attr($file_name).qq!" title="!.esc_attr($file_name).qq!"!;
56215628
}
56225629
print qq! src="! .
56235630
href(action=>"blob_plain", hash=>$hash,
@@ -5630,7 +5637,7 @@ sub git_blob {
56305637
$nr++;
56315638
$line = untabify($line);
56325639
printf qq!<div class="pre"><a id="l%i" href="%s#l%i" class="linenr">%4i</a> %s</div>\n!,
5633-
$nr, href(-replay => 1), $nr, $nr, $syntax ? $line : esc_html($line, -nbsp=>1);
5640+
$nr, esc_attr(href(-replay => 1)), $nr, $nr, $syntax ? $line : esc_html($line, -nbsp=>1);
56345641
}
56355642
}
56365643
close $fd
@@ -5692,7 +5699,7 @@ sub git_tree {
56925699
undef $hash_base;
56935700
print "<div class=\"page_nav\">\n";
56945701
print "<br/><br/></div>\n";
5695-
print "<div class=\"title\">$hash</div>\n";
5702+
print "<div class=\"title\">".esc_html($hash)."</div>\n";
56965703
}
56975704
if (defined $file_name) {
56985705
$basedir = $file_name;
@@ -6160,7 +6167,7 @@ sub git_blobdiff {
61606167
git_print_header_div('commit', esc_html($co{'title'}), $hash_base);
61616168
} else {
61626169
print "<div class=\"page_nav\"><br/>$formats_nav<br/></div>\n";
6163-
print "<div class=\"title\">$hash vs $hash_parent</div>\n";
6170+
print "<div class=\"title\">".esc_html("$hash vs $hash_parent")."</div>\n";
61646171
}
61656172
if (defined $file_name) {
61666173
git_print_page_path($file_name, "blob", $hash_base);

0 commit comments

Comments
 (0)