]> git.kaiwu.me - nginx.git/commit
Fixed $cookie_ after a cookie without a name
authorVadim Zhestikov <v.zhestikov@f5.com>
Fri, 9 Oct 2026 19:08:23 +0000 (12:08 -0700)
committerVadimZhestikov <108960056+VadimZhestikov@users.noreply.github.com>
Wed, 28 Oct 2026 19:37:18 +0000 (12:37 -0700)
commit67290bfea61c81347464539f5e6d0a7cebec1fc8
treeba39846dd1694e3f1cf86500e5d9cb86a41c09a3
parent5cb1e207b1dd0ae8f061cb92170c3f0dd3f782b2
Fixed $cookie_ after a cookie without a name

A cookie without a name, such as "a" in "Cookie: a; a=1", was skipped
together with the separator that follows it, so the next cookie was
skipped as well and $cookie_a was not found.  The userid module was
affected in the same way.

User agents send a cookie with an empty name as a bare value (RFC
6265bis, section 5.8.3), so such a token is a valid part of the Cookie
header.

The fix is to not consume the character that fails the "=" check.

The problem appeared in 899b44eab (0.1.29).
src/http/ngx_http_parse.c