If a project name contains special URL characters like +, gitweb's links
break in subtle ways. The solution is to pass the project name through
esc_url() and using the return value.
Signed-off-by: martin f. krafft <madduck@madduck.net>
---
gitweb/gitweb.perl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a48bebb..241ae17 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -633,7 +633,7 @@ sub href(%) {
my ($use_pathinfo) = gitweb_check_feature('pathinfo');
if ($use_pathinfo) {
# use PATH_INFO for project name
- $href .= "/$params{'project'}" if defined $params{'project'};
+ $href .= "/".esc_url($params{'project'}) if defined $params{'project'};
delete $params{'project'};
# Summary just uses the project path URL
@@ -2575,7 +2575,7 @@ EOF
my $action = $my_uri;
my ($use_pathinfo) = gitweb_check_feature('pathinfo');
if ($use_pathinfo) {
- $action .= "/$project";
+ $action .= "/".esc_url($project);
} else {
$cgi->param("p", $project);
}
--
1.5.5.rc2
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.27-rc8 |
| Ingo Molnar | [patch] scsi: revert "[SCSI] Get rid of scsi_cmnd->done" |
| Jan Engelhardt | [PATCH] Cute feature: colored printk output |
| Rafael J. Wysocki | Re: Suspend to RAM regression in 2.6.28-rc2 (bisected) |
git: | |
| David Kastrup | Empty directories... |
| Pavel Roskin | Implementing branch attributes in git config |
| Pierre Habouzit | [RFC] git integrated bugtracking |
| Peter Stahlir | Re: Git as a filesystem |
| Christian Weisgerber | Re: libiconv problem |
| Douglas A. Tutty | low-MHz server |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| J.W. Zondag | Dell PE1950 III - Perc 6i |
| Karlin Dodd | VL-bus questions |
| Greg Hilton | PS2mouse supported with X386 |
| Joern Rennecke | Use shadow ram? |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
