From: Andreas Brauchli Date: Fri, 29 Jul 2016 14:49:37 +0000 (+0200) Subject: gitweb: escape link body in format_ref_marker X-Git-Tag: v2.9.3~11^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77947bbe24e0306d1ce5605c962c4a25f5aca22f;p=thirdparty%2Fgit.git gitweb: escape link body in format_ref_marker Fix a case where an html link can be generated from unescaped input resulting in invalid strict xhtml or potentially injected code. An overview of a repo with a tag "1.0.0&0.0.1" would previously result in an unescaped ampersand in the link body. Signed-off-by: Andreas Brauchli Acked-by: Jakub Narębski Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 2fddf750fa..33d701d852 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2090,7 +2090,7 @@ sub format_ref_marker { -href => href( action=>$dest_action, hash=>$dest - )}, $name); + )}, esc_html($name)); $markers .= " " . $link . "";