Skip to content

gitweb: quote base url more consistently

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4t9502: pass along all arguments in xss helpert/t9502-gitweb-standalone-parse-output.sh+2 -20 replies
2/4t/gitweb-lib.sh: drop confusing quotest/gitweb-lib.sh+2 -20 replies
3/4t/gitweb-lib.sh: set $REQUEST_URIt/gitweb-lib.sh+2 -10 replies
4/4gitweb: escape URLs generated by href()gitweb/gitweb.perl t/t9502-gitweb-standalone-parse-output.sh+19 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] gitweb: quote base url more consistently

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 <[email protected]>.

[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