Mercurial > hg
comparison mercurial/templates/gitweb/summary.tmpl @ 18526:9409aeaafdc1 stable
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Without this, repository paths or names containing e.g. & characters or html
tags yielded strange results, possibly allowing cross-site scripting attacks.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 01 Feb 2013 20:43:35 +0100 |
parents | bebb05a7e249 |
children | 32f76eccbced |
comparison
equal
deleted
inserted
replaced
18525:462579cbad45 | 18526:9409aeaafdc1 |
---|---|
1 {header} | 1 {header} |
2 <title>{repo|escape}: Summary</title> | 2 <title>{repo|escape}: Summary</title> |
3 <link rel="alternate" type="application/atom+xml" | 3 <link rel="alternate" type="application/atom+xml" |
4 href="{url}atom-log" title="Atom feed for {repo|escape}"/> | 4 href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/> |
5 <link rel="alternate" type="application/rss+xml" | 5 <link rel="alternate" type="application/rss+xml" |
6 href="{url}rss-log" title="RSS feed for {repo|escape}"/> | 6 href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 | 9 |
10 <div class="page_header"> | 10 <div class="page_header"> |
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> | 11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> |
12 <a href="/">Mercurial</a> {pathdef%breadcrumb} / summary | 12 <a href="/">Mercurial</a> {pathdef%breadcrumb} / summary |
13 <form action="{url}log"> | 13 <form action="{url|urlescape}log"> |
14 {sessionvars%hiddenformentry} | 14 {sessionvars%hiddenformentry} |
15 <div class="search"> | 15 <div class="search"> |
16 <input type="text" name="rev" /> | 16 <input type="text" name="rev" /> |
17 </div> | 17 </div> |
18 </form> | 18 </form> |
19 </div> | 19 </div> |
20 | 20 |
21 <div class="page_nav"> | 21 <div class="page_nav"> |
22 summary | | 22 summary | |
23 <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | | 23 <a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a> | |
24 <a href="{url}log{sessionvars%urlparameter}">changelog</a> | | 24 <a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a> | |
25 <a href="{url}graph{sessionvars%urlparameter}">graph</a> | | 25 <a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a> | |
26 <a href="{url}tags{sessionvars%urlparameter}">tags</a> | | 26 <a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a> | |
27 <a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a> | | 27 <a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a> | |
28 <a href="{url}branches{sessionvars%urlparameter}">branches</a> | | 28 <a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a> | |
29 <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry} | | 29 <a href="{url|urlescape}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry} | |
30 <a href="{url}help{sessionvars%urlparameter}">help</a> | 30 <a href="{url|urlescape}help{sessionvars%urlparameter}">help</a> |
31 <br/> | 31 <br/> |
32 </div> | 32 </div> |
33 | 33 |
34 <div class="title"> </div> | 34 <div class="title"> </div> |
35 <table cellspacing="0"> | 35 <table cellspacing="0"> |
36 <tr><td>description</td><td>{desc}</td></tr> | 36 <tr><td>description</td><td>{desc}</td></tr> |
37 <tr><td>owner</td><td>{owner|obfuscate}</td></tr> | 37 <tr><td>owner</td><td>{owner|obfuscate}</td></tr> |
38 <tr><td>last change</td><td>{lastchange|rfc822date}</td></tr> | 38 <tr><td>last change</td><td>{lastchange|rfc822date}</td></tr> |
39 </table> | 39 </table> |
40 | 40 |
41 <div><a class="title" href="{url}shortlog{sessionvars%urlparameter}">changes</a></div> | 41 <div><a class="title" href="{url|urlescape}shortlog{sessionvars%urlparameter}">changes</a></div> |
42 <table cellspacing="0"> | 42 <table cellspacing="0"> |
43 {shortlog} | 43 {shortlog} |
44 <tr class="light"><td colspan="4"><a class="list" href="{url}shortlog{sessionvars%urlparameter}">...</a></td></tr> | 44 <tr class="light"><td colspan="4"><a class="list" href="{url|urlescape}shortlog{sessionvars%urlparameter}">...</a></td></tr> |
45 </table> | 45 </table> |
46 | 46 |
47 <div><a class="title" href="{url}tags{sessionvars%urlparameter}">tags</a></div> | 47 <div><a class="title" href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></div> |
48 <table cellspacing="0"> | 48 <table cellspacing="0"> |
49 {tags} | 49 {tags} |
50 <tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr> | 50 <tr class="light"><td colspan="3"><a class="list" href="{url|urlescape}tags{sessionvars%urlparameter}">...</a></td></tr> |
51 </table> | 51 </table> |
52 | 52 |
53 <div><a class="title" href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></div> | 53 <div><a class="title" href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></div> |
54 <table cellspacing="0"> | 54 <table cellspacing="0"> |
55 {bookmarks%bookmarkentry} | 55 {bookmarks%bookmarkentry} |
56 <tr class="light"><td colspan="3"><a class="list" href="{url}bookmarks{sessionvars%urlparameter}">...</a></td></tr> | 56 <tr class="light"><td colspan="3"><a class="list" href="{url|urlescape}bookmarks{sessionvars%urlparameter}">...</a></td></tr> |
57 </table> | 57 </table> |
58 | 58 |
59 <div><a class="title" href="{url}branches{sessionvars%urlparameter}">branches</a></div> | 59 <div><a class="title" href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></div> |
60 <table cellspacing="0"> | 60 <table cellspacing="0"> |
61 {branches%branchentry} | 61 {branches%branchentry} |
62 <tr class="light"> | 62 <tr class="light"> |
63 <td colspan="4"><a class="list" href="{url}branches{sessionvars%urlparameter}">...</a></td> | 63 <td colspan="4"><a class="list" href="{url|urlescape}branches{sessionvars%urlparameter}">...</a></td> |
64 </tr> | 64 </tr> |
65 </table> | 65 </table> |
66 {footer} | 66 {footer} |