Skip to content

Tags: openresty/lua-nginx-module

Tags

v0.10.32rc4

Toggle v0.10.32rc4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
bugfix: ngx.flush() buffer could be recycled while still queued. (#2518)

Buffer taken from ctx->free_bufs with tag and with size 0 would be
returned to the ctx->free_bufs by ngx_chain_update_chains(). When
reused, it results into memzeroing the flush flag and "zero size buf
in writer t:1 r:0 f:0" alerts.

v0.10.32rc3

Toggle v0.10.32rc3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
bugfix: clean child coroutine ops when killing uthreads.

Cancel descendant coroutine operations before deleting killed user threads so delayed cosocket events cannot resume collected Lua states.

v0.10.32rc2

Toggle v0.10.32rc2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
style: fixed code style.

Use nginx macros instead of the original "memmove" and remove
unnecessary spaces.

v0.10.32rc1

Toggle v0.10.32rc1's commit message
bumped lua-nginx-module to v0.10.32.

v0.10.31

Toggle v0.10.31's commit message
tests: t/016-resp-header.t: failed in http3 mode.

v0.10.31rc5

Toggle v0.10.31rc5's commit message
bugfix: get_client_hello_ext returned NGX_OK on OOM with NULL extensi…

…ons.

ngx_http_lua_ffi_ssl_get_client_hello_ext() did:

    *extensions = ngx_palloc(...);
    if (*extensions != NULL) {
        ngx_memcpy(...);
        *extensions_len = ext_len;
    }
    return NGX_OK;

so when ngx_palloc() failed the function left *extensions NULL and
*extensions_len untouched, but still reported success. The Lua FFI
caller then dereferenced a NULL pointer or read whatever junk was in
the output-length slot.

Treat the allocation failure as an error: free the OpenSSL-allocated
buffer, set *err, and return NGX_ERROR.

v0.10.31rc4

Toggle v0.10.31rc4's commit message
bugfix: failed to override headers (e.g. WWW-Authenticate) copied fro…

…m upstream.

When a builtin multi-value header (such as WWW-Authenticate) is copied from
the upstream response via ngx_http_upstream_copy_header_line with offset 0,
the corresponding r->headers_out.<field> pointer stays NULL even though the
header is present in r->headers_out.headers. As a result, setting
ngx.header[name] from Lua would append a new entry instead of overwriting
the existing one.

Walk r->headers_out.headers to overwrite the first match and clear the rest,
then repoint *headers so subsequent multi-header semantics keep working.
The same fix is applied to the pre-1.23.0 array-based code path.

v0.10.31rc3

Toggle v0.10.31rc3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
bugfix: SIGSEGV in receiveuntil __gc on aborted multipart upload. (#2504

)

read_error_retval_handler calls finalize_read_part directly when
the receiveuntil iterator's recv errors. That clears u->buf_in
but leaves cp->upstream live with cp->state > 0. Later GC fires
cleanup_compiled_pattern -> read_prepare, which derefs the
now-NULL u->buf_in.

Mirror tcp_finalize's cp->upstream = NULL detach so __gc's
existing `if (u != NULL)` guard short-circuits.

Backtrace:

  ngx_http_lua_socket_tcp_read_prepare
  ngx_http_lua_socket_cleanup_compiled_pattern
  lj_BC_FUNCC
  gc_call_finalizer
  gc_finalize
  gc_onestep
  lj_gc_fullgc
  lua_gc
  lj_cf_collectgarbage
  lj_BC_FUNCC
  ngx_http_lua_run_thread
  ngx_http_lua_socket_tcp_resume_helper
  ngx_http_lua_access_handler
  ngx_http_core_access_phase
  ngx_http_core_run_phases
  ngx_http_lua_socket_tcp_read
  ngx_http_request_handler
  ngx_epoll_process_events
  ngx_process_events_and_timers
  ngx_worker_process_cycle
  ngx_spawn_process
  ngx_start_worker_processes
  ngx_master_process_cycle
  main

* add tests.

---------

Co-authored-by: lijunlong <lijunlong@openresty.com>

v0.10.31rc2

Toggle v0.10.31rc2's commit message
tests: Improving the success rate of the test, as it relies on the pu…

…blic network, may still fail.

v0.10.31rc1

Toggle v0.10.31rc1's commit message
tests: update nginx to 1.29.8.