git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <junkio@cox.net>
Cc: Li Yang-r58472 <LeoLi@freescale.com>,
	Jakub Narebski <jnareb@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Change to use explicitly function call cgi->escapHTML()
Date: Tue, 6 Mar 2007 05:56:29 -0500	[thread overview]
Message-ID: <20070306105629.GA13285@coredump.intra.peff.net> (raw)
In-Reply-To: <7vveheprsc.fsf@assigned-by-dhcp.cox.net>

On Tue, Mar 06, 2007 at 02:53:07AM -0800, Junio C Hamano wrote:

> But then you are letting _other_ mod_perl users to affect your
> behaviour, aren't you?  "sub autoEscape" does this:

Yes (but I don't know how mod_perl works, and I haven't been able to
find a simple answer by skimming the docs).

> If we worry about mod_perl (provided if $CGI::Q is shared across
> mod_perl users), I suspect we would need to be a bit more
> paranoid, perhaps like this, woudln't we?
> [...]
> +$cgi->autoEscape(1);

That rebreaks the original problem, though. Calling escapeHTML doesn't
look at $cgi, it looks at $Q (the "default" CGI object). I believe
escape is _already_ set to 1 for $cgi (which is why the $cgi->escapeHTML
patch worked).

-Peff

  reply	other threads:[~2007-03-06 10:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06  3:58 [PATCH] gitweb: Change to use explicitly function call cgi->escapHTML() Li Yang
2007-03-06  6:55 ` Junio C Hamano
2007-03-06  9:34   ` Jakub Narebski
2007-03-06  9:39     ` Jeff King
2007-03-06  9:46       ` Junio C Hamano
2007-03-06 10:31       ` Li Yang-r58472
2007-03-06 10:41         ` Jeff King
2007-03-06 10:53           ` Junio C Hamano
2007-03-06 10:56             ` Jeff King [this message]
2007-03-06 10:58               ` Junio C Hamano
2007-03-06 11:01                 ` Jeff King
2007-03-06 11:05                   ` Junio C Hamano
2007-03-06 11:07                     ` Jeff King
2007-03-06 11:07                   ` Li Yang-r58472
2007-03-06 10:45         ` Junio C Hamano
2007-03-06 13:23           ` Jakub Narebski
2007-03-06 23:17             ` Junio C Hamano
2007-03-07  0:37               ` Jakub Narebski
2007-03-07  0:49                 ` Junio C Hamano
2007-03-07  1:21                   ` [PATCH] gitweb: Don't escape attributes in CGI.pm HTML methods Jakub Narebski
2007-03-07  1:40                     ` 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=20070306105629.GA13285@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=LeoLi@freescale.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=junkio@cox.net \
    /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).