[PATCH 0 of 1] Bad input handling: discussion

Thomas De Schampheleire patrickdepinguin at gmail.com
Thu Feb 26 15:06:36 EST 2015


On Thu, Feb 26, 2015 at 4:50 PM, Andrew Shadura <andrew at shadura.me> wrote:
> In [1], Mads and I had a discussion on what to do with bad input we may
> sometimes receive. My idea is that we should use everything we know how
> to handle and ignore what we can't. Mads, if I understood him correctly,
> insists we should be conservative in what we accept and just complain if
> someone's trying to feed us something we can't handle.
>
> What's your opinion on this?
>
> [1]: https://bitbucket.org/conservancy/kallithea/commits/cc1ab5ef6686526b7aad8c0c190a5c2944e92ecf#Lkallithea/controllers/changeset.pyT78
>

I don't think Kallithea should crash or present 500 in cases where an
input is not what we expect.
In any case, '400 bad request' is better than '500 server error', as
also said by Mads in [1].

Whether or not we should ignore invalid input: my initial thought was
that it is good idea. However, from the link Mads provided in [1], it
seems there can be security issues with such behavior, in general. So
I'm not sure anymore what to do here, I'm not very familiar with this
area.

What could be the reason for such invalid input, other than malicious attempts?


More information about the kallithea-general mailing list