List for cgit developers and users
 help / color / mirror / Atom feed
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 22:17:43 +0000	[thread overview]
Message-ID: <20140112221743.GV7608@serenity.lan> (raw)
In-Reply-To: <CAHmME9r4KOqJ-o-9w1zPtOe4DP5fYqRs=CFNh=Ru5Hp2U4hsog@mail.gmail.com>

On Sun, Jan 12, 2014 at 11:02:01PM +0100, Jason A. Donenfeld wrote:
> Same question here -- XSS potential?

This is the one that worries me.  But actually, Git strips "<", ">" and
"\n" from GIT_*_NAME, so the question becomes whether we can manually
construct a Git object to exploit this.

I think the parsing.c::parse_user() function then saves us by stopping
the name as soon as it hits "<".  So there cannot be any way to insert
HTML elements here.


      reply	other threads:[~2014-01-12 22:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12 19:45 john
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 [this message]

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=20140112221743.GV7608@serenity.lan \
    --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).