[PATCH] fix: UnicodeDecodeError: can't decode byte 0xad
Valentin Kleibel
valentin at vrvis.at
Tue Sep 3 09:29:01 UTC 2024
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