Skip to content

Commit fa1c854

Browse files
committed
Git 1.7.3.4
Signed-off-by: Junio C Hamano <[email protected]>
2 parents ada6a41 + b91779f commit fa1c854

File tree

9 files changed

+113
-18
lines changed

9 files changed

+113
-18
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.

Documentation/RelNotes/1.7.3.4.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@ Fixes since v1.7.3.3
3939
* The post-receive-email sample hook was accidentally broken in 1.7.3.3
4040
update.
4141

42+
* "gitweb" can sometimes be tricked into parrotting a filename argument
43+
given in a request without properly quoting.
44+
4245
Other minor fixes and documentation updates are also included.

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.3.3
4+
DEF_VER=v1.7.3.4
55

66
LF='
77
'

gitweb/gitweb.perl

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,13 @@ sub esc_url {
13561356
return $str;
13571357
}
13581358

1359+
# quote unsafe characters in HTML attributes
1360+
sub esc_attr {
1361+
1362+
# for XHTML conformance escaping '"' to '&quot;' is not enough
1363+
return esc_html(@_);
1364+
}
1365+
13591366
# replace invalid utf8 character with SUBSTITUTION sequence
13601367
sub esc_html {
13611368
my $str = shift;
@@ -1761,7 +1768,7 @@ sub format_ref_marker {
17611768
hash=>$dest
17621769
)}, $name);
17631770

1764-
$markers .= " <span class=\"$class\" title=\"$ref\">" .
1771+
$markers .= " <span class=\"".esc_attr($class)."\" title=\"".esc_attr($ref)."\">" .
17651772
$link . "</span>";
17661773
}
17671774
}
@@ -1845,7 +1852,7 @@ sub git_get_avatar {
18451852
return $pre_white .
18461853
"<img width=\"$size\" " .
18471854
"class=\"avatar\" " .
1848-
"src=\"$url\" " .
1855+
"src=\"".esc_url($url)."\" " .
18491856
"alt=\"\" " .
18501857
"/>" . $post_white;
18511858
} else {
@@ -2556,7 +2563,7 @@ sub git_show_project_tagcloud {
25562563
} else {
25572564
my @tags = sort { $cloud->{$a}->{count} <=> $cloud->{$b}->{count} } keys %$cloud;
25582565
return '<p align="center">' . join (', ', map {
2559-
"<a href=\"$home_link?by_tag=$_\">$cloud->{$_}->{topname}</a>"
2566+
$cgi->a({-href=>"$home_link?by_tag=$_"}, $cloud->{$_}->{topname})
25602567
} splice(@tags, 0, $count)) . '</p>';
25612568
}
25622569
}
@@ -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)