]> git.kaiwu.me - njs.git/commit
Modules: fixed name corruption in variable and header processing.
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 8 Feb 2025 01:23:09 +0000 (17:23 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Tue, 11 Feb 2025 01:50:42 +0000 (17:50 -0800)
commitae7d4f42d5d7497e6e8d3d30ff5aebfba228d27c
tree20036e19dbb6de39a0928fa9834e7fd955ae8cc8
parentf289dcb99a9e4c9b72ca8d1c60659a43e58547cd
Modules: fixed name corruption in variable and header processing.

The HTTP and Stream JS modules were performing in-place lowercasing of
variable and header names, which could inadvertently overwrite the
original data.

In the NJS engine, the problem did not manifest itself for strings up to
14 bytes long because they are inlined into the value.
nginx/ngx_http_js_module.c
nginx/ngx_stream_js_module.c
nginx/t/js_headers.t
nginx/t/js_variables.t
nginx/t/stream_js_var.t