From: Vadim Zhestikov Date: Wed, 19 Aug 2026 19:41:08 +0000 (-0700) Subject: Uwsgi: support for multibyte parameter name lengths. X-Git-Tag: release-1.31.5~18 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=bc7c3424c30d3b140650cdc5ba7fe978f55f4f4e;p=nginx.git Uwsgi: support for multibyte parameter name lengths. The name length of a configured parameter was truncated to one byte before the per-parameter length field was written, so that a uwsgi_param name of 256 bytes or longer was encoded with a wrong length while the name itself was copied in full. The resulting request was malformed, and upstream servers responded by closing the connection. While long names are barely used in practice, it is easy to support them. The length is now properly encoded up to the allowed length. --- diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c index 8d243bc90..6193c941e 100644 --- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -1075,7 +1075,7 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r) while (*(uintptr_t *) le.ip) { lcode = *(ngx_http_script_len_code_pt *) le.ip; - key_len = (u_char) lcode(&le); + key_len = lcode(&le); lcode = *(ngx_http_script_len_code_pt *) le.ip; skip_empty = lcode(&le);