From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 1/3] ui-refs: escape HTML chars in author and tagger names
Date: Sun, 12 Jan 2014 19:45:15 +0000 [thread overview]
Message-ID: <432e1f40c0d887db602ec9411ae16c45896a54f5.1389555852.git.john@keeping.me.uk> (raw)
Everywhere else we use html_txt to escape any special characters in
these variables. Do so here as well.
Signed-off-by: John Keeping <john at keeping.me.uk>
---
I spotted this while looking at Jason's jd/gravatar series. The
following two patches cover other similar issues I spotted while
auditing all uses of "html()". I think everything else is OK.
ui-refs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui-refs.c b/ui-refs.c
index 20c91e3..c97b0c6 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -155,9 +155,9 @@ static int print_tag(struct refinfo *ref)
html("</td><td>");
if (info) {
if (info->tagger)
- html(info->tagger);
+ html_txt(info->tagger);
} else if (ref->object->type == OBJ_COMMIT) {
- html(ref->commit->author);
+ html_txt(ref->commit->author);
}
html("</td><td colspan='2'>");
if (info) {
--
1.8.5.226.g0d60d77
next reply other threads:[~2014-01-12 19:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-12 19:45 john [this message]
2014-01-12 19:45 ` [PATCH 2/3] ui-shared: URL-escape script_name john
2014-01-12 21:18 ` Jason
2014-01-12 22:00 ` john
2014-01-12 19:45 ` [PATCH 3/3] ui-repolist: HTML-escape cgit_rooturl() response john
2014-01-12 22:03 ` Jason
2014-01-12 22:02 ` [PATCH 1/3] ui-refs: escape HTML chars in author and tagger names Jason
2014-01-12 22:17 ` john
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=432e1f40c0d887db602ec9411ae16c45896a54f5.1389555852.git.john@keeping.me.uk \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).