Mercurial > hg-stable
comparison mercurial/templates/paper/fileannotate.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 | 52305554fd6e |
comparison
equal
deleted
inserted
replaced
18525:462579cbad45 | 18526:9409aeaafdc1 |
---|---|
5 | 5 |
6 <div class="container"> | 6 <div class="container"> |
7 <div class="menu"> | 7 <div class="menu"> |
8 <div class="logo"> | 8 <div class="logo"> |
9 <a href="{logourl}"> | 9 <a href="{logourl}"> |
10 <img src="{staticurl}{logoimg}" alt="mercurial" /></a> | 10 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a> |
11 </div> | 11 </div> |
12 <ul> | 12 <ul> |
13 <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li> | 13 <li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li> |
14 <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li> | 14 <li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li> |
15 <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li> | 15 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li> |
16 <li><a href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></li> | 16 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li> |
17 <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li> | 17 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li> |
18 </ul> | 18 </ul> |
19 | 19 |
20 <ul> | 20 <ul> |
21 <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li> | 21 <li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li> |
22 <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li> | 22 <li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li> |
23 </ul> | 23 </ul> |
24 <ul> | 24 <ul> |
25 <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li> | 25 <li><a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li> |
26 <li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li> | 26 <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li> |
27 <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li> | 27 <li><a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li> |
28 <li><a href="{url}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li> | 28 <li><a href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li> |
29 <li class="active">annotate</li> | 29 <li class="active">annotate</li> |
30 <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li> | 30 <li><a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li> |
31 <li><a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a></li> | 31 <li><a href="{url|urlescape}raw-annotate/{node|short}/{file|urlescape}">raw</a></li> |
32 </ul> | 32 </ul> |
33 <ul> | 33 <ul> |
34 <li><a href="{url}help{sessionvars%urlparameter}">help</a></li> | 34 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li> |
35 </ul> | 35 </ul> |
36 </div> | 36 </div> |
37 | 37 |
38 <div class="main"> | 38 <div class="main"> |
39 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2> | 39 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2> |
40 <h3>annotate {file|escape} @ {rev}:{node|short}</h3> | 40 <h3>annotate {file|escape} @ {rev}:{node|short}</h3> |
41 | 41 |
42 <form class="search" action="{url}log"> | 42 <form class="search" action="{url|urlescape}log"> |
43 {sessionvars%hiddenformentry} | 43 {sessionvars%hiddenformentry} |
44 <p><input name="rev" id="search1" type="text" size="30" /></p> | 44 <p><input name="rev" id="search1" type="text" size="30" /></p> |
45 <div id="hint">find changesets by author, revision, | 45 <div id="hint">find changesets by author, revision, |
46 files, or words in the commit message</div> | 46 files, or words in the commit message</div> |
47 </form> | 47 </form> |