mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
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 <a.brauchli@elementarea.net> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0b65a8dbdb
commit
77947bbe24
@ -2090,7 +2090,7 @@ sub format_ref_marker {
|
||||
-href => href(
|
||||
action=>$dest_action,
|
||||
hash=>$dest
|
||||
)}, $name);
|
||||
)}, esc_html($name));
|
||||
|
||||
$markers .= " <span class=\"".esc_attr($class)."\" title=\"".esc_attr($ref)."\">" .
|
||||
$link . "</span>";
|
||||
|
Loading…
Reference in New Issue
Block a user