All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH 2/2] gitweb: Protect escaping functions against calling on undef
Date: Wed, 17 Feb 2010 17:26:53 +0100	[thread overview]
Message-ID: <201002171726.53418.jnareb@gmail.com> (raw)
In-Reply-To: <20100207205130.11146.30664.stgit@localhost.localdomain>

On Sun, 7 Feb 2010, Jakub Narebski wrote:

> This is a bit of future-proofing esc_html and friends: when called
> with undefined value they would now would return undef... which would
> probably mean that error would still occur, but closer to the source
> of problem.
> 
> This means that we can safely use
>   esc_html(shift) || "Internal Server Error"
> in die_error() instead of
>   esc_html(shift || "Internal Server Error")
> 
> Signed-off-by: Jakub Narebski <jnareb@gmail.com>
> ---
> Without the second part (i.e. the change in die_error) those two
> patches would be totally independent.

Ping!

All but last chunk (last chunk depends on PATCH 1/2) are a bit of
hardening / defensive programming... although currently not necessary
(gitweb doesn't pass undef to its escaping subroutines... I think).

-- 
Jakub Narebski
Poland

      reply	other threads:[~2010-02-17 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-07 20:47 [PATCH 0/2] gitweb: Improve escaping Jakub Narebski
2010-02-07 20:51 ` [PATCH 1/2] gitweb: esc_html (short) error message in die_error Jakub Narebski
2010-02-17 16:21   ` Jakub Narebski
2010-02-07 20:52 ` [PATCH 2/2] gitweb: Protect escaping functions against calling on undef Jakub Narebski
2010-02-17 16:26   ` Jakub Narebski [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=201002171726.53418.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /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.