All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: NAKAYAMA DAISUKE <nakyamad@icloud.com>
Subject: [PATCH 0/4] gitweb: quote base url more consistently
Date: Fri, 15 Nov 2019 04:05:45 -0500	[thread overview]
Message-ID: <20191115090545.GA30971@sigill.intra.peff.net> (raw)

This series fixes an XSS issue reported to the git-security list where
gitweb doesn't always quote its base url, meaning a specially-crafted
URL can inject HTML into the finished page. Given the relatively low
severity of the problem and my lack of familiarity with gitweb, it makes
sense to me to just discuss this one in the open.

Credit for the finding the problem (and some patient explanations) goes
to NAKAYAMA DAISUKE <nakyamad@icloud.com>.

  [1/4]: t9502: pass along all arguments in xss helper
  [2/4]: t/gitweb-lib.sh: drop confusing quotes
  [3/4]: t/gitweb-lib.sh: set $REQUEST_URI
  [4/4]: gitweb: escape URLs generated by href()

 gitweb/gitweb.perl                        | 31 +++++++++++++----------
 t/gitweb-lib.sh                           |  7 ++---
 t/t9502-gitweb-standalone-parse-output.sh |  7 ++---
 3 files changed, 25 insertions(+), 20 deletions(-)

-Peff

             reply	other threads:[~2019-11-15  9:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15  9:05 Jeff King [this message]
2019-11-15  9:05 ` [PATCH 1/4] t9502: pass along all arguments in xss helper Jeff King
2019-11-15  9:06 ` [PATCH 2/4] t/gitweb-lib.sh: drop confusing quotes Jeff King
2019-11-15  9:06 ` [PATCH 3/4] t/gitweb-lib.sh: set $REQUEST_URI Jeff King
2019-11-15  9:06 ` [PATCH 4/4] gitweb: escape URLs generated by href() Jeff King
2019-11-18  1:45 ` [PATCH 0/4] gitweb: quote base url more consistently Junio C Hamano

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=20191115090545.GA30971@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=nakyamad@icloud.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.