Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix un-html escaped hrefs causing XSS #195

Merged
merged 1 commit into from May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Avoid XSS when rendering a hrefs
  • Loading branch information
cdrini committed May 27, 2022
commit ccc2141c5fb093870c9e2742c01336ecca8cd12e
4 changes: 2 additions & 2 deletions infogami/core/macros/PageList.html
Expand Up @@ -10,8 +10,8 @@

<div>
$if page != 0:
&larr; <a href="$:changequery(page=page - 1)">Prev</a>
&larr; <a href="$changequery(page=page - 1)">Prev</a>

$if len(pages) == limit:
... <a href="$:changequery(page=page + 1)">Next</a> &rarr;
... <a href="$changequery(page=page + 1)">Next</a> &rarr;
</div>
4 changes: 2 additions & 2 deletions infogami/core/macros/RecentChanges.html
Expand Up @@ -37,9 +37,9 @@

<div>
$if page != 0:
<a href="$:changequery(rc_page=page - 1)">Newer</a>
<a href="$changequery(rc_page=page - 1)">Newer</a>

$if len(changes) == limit:
<a href="$:changequery(rc_page=page + 1)">Older</a>
<a href="$changequery(rc_page=page + 1)">Older</a>
<div>

2 changes: 1 addition & 1 deletion infogami/core/templates/permission_denied.html
Expand Up @@ -7,4 +7,4 @@
<br/><br/>

$if not ctx.user:
You may <a href="/account/login?$:urlencode(dict(redirect=path))">Login</a> if you have the required permissions.
You may <a href="/account/login?$urlencode(dict(redirect=path))">Login</a> if you have the required permissions.
2 changes: 1 addition & 1 deletion infogami/plugins/i18n/templates/i18n.html
Expand Up @@ -21,7 +21,7 @@
<tr>
<td style="vertical-align: top">
$for ns in _.get_namespaces():
<a href="$:changequery(ns=ns)" >$(ns or "root")</a> <span id="count" style="font-size: 0.8em; ">$(_.get_count(ns, lang))/$_.get_count(ns)</span> <br/>
<a href="$changequery(ns=ns)" >$(ns or "root")</a> <span id="count" style="font-size: 0.8em; ">$(_.get_count(ns, lang))/$_.get_count(ns)</span> <br/>
</td>
<td style="vertical-align: top">
$if page:
Expand Down