[PATCH] fix: UnicodeDecodeError: can't decode byte 0xad
Mads Kiilerich
mads at kiilerich.com
Sat Sep 21 19:26:02 UTC 2024
Thank you.
I pushed that to the stable branch.
/Mads
On 03/09/2024 11:29, Valentin Kleibel wrote:
> Hi,
>
>> I propose handling it like
>> https://kallithea-scm.org/repos/kallithea-incoming/changeset/8b7c72355750fcf791cd4abfc332e26e556aee90
>> .
>>
>> We don't really *know* if the error came from the URL encoding, so I
>> prefer to just catch the error we actually saw, and state the fact
>> that we got a decode exception while processing request parameters.
>>
>> Do you agree patch that would be fine - and that the attribution is
>> fine?
>
> Thanks for your work, that patch looks/works good and the attribution
> is fine with me.
>
>> I'm not positively sure webob can't choke on decoding anything else.
>> That could perhaps be nice to test/review too. But that is apparently
>> not a real problem (yet).
>
> I'm pretty sure it can, but one might need to send a wrong encoding in
> the Content-type header.
> For the URL-parameters, in contrast, every byte sequence encoded will
> always be interpreted as UTF-8, even before csrf or auth checks.
>
> Valentin
More information about the kallithea-general
mailing list