Removing Null Character from Query Parameter
Maxim Dounin
mdounin at mdounin.ru
Thu Jun 25 16:48:20 UTC 2020
Hello!
On Thu, Jun 25, 2020 at 11:33:29AM -0400, anish10dec wrote:
> Nginx Upstream returning 400 Bad Request if null character is being passed
> in the request as part of uri or query params.
>
> Is there a way Null Character can be removed from request before proxying
> it to upstream.
>
> Its only known from access logs that null character is being passed in
> request as \x00 and causing the failure
The null character is not allowed in the HTTP request line, and
hence nginx returns 400 (Bad Request) error.
> How to identify the Null Character and remove it ?
You can't. Instead, consider fixing the client to generate HTTP
requests correctly.
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx
mailing list