]> git.kaiwu.me - njs.git/commit
HTTP: split QuickJS request arguments before decoding
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 18 Nov 2026 01:16:32 +0000 (17:16 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 19 Nov 2026 06:07:22 +0000 (22:07 -0800)
commitadbb92806f8769cbb5c9c7834e681bdabe99fd77
treefbf176e73b27f7ef4c8014dc4aa4fc64c24dd287
parent4e3c8782459f872adc24ff0ddd6697c1892cda0a
HTTP: split QuickJS request arguments before decoding

Previously, percent decoding the whole query string made encoded
ampersands and equals signs act as separators. Use the QuickJS
querystring parser to split the raw query before decoding each field.

Match the njs engine by accepting empty names and limiting the parse
to the first 1000 segments.

The issue was introduced in 201b1276 (0.8.6).
external/qjs_query_string_module.c
nginx/ngx_http_js_module.c
nginx/t/js_args.t
src/qjs.h