Skip to content

mod_cgi: honor rejected CGI header collisions - #170

Open
deprrous wants to merge 1 commit into
lighttpd:masterfrom
deprrous:pr/lighttpd-cgi-header-conflict
Open

mod_cgi: honor rejected CGI header collisions#170
deprrous wants to merge 1 commit into
lighttpd:masterfrom
deprrous:pr/lighttpd-cgi-header-conflict

Conversation

@deprrous

Copy link
Copy Markdown

http_cgi_headers() already rejects request headers that collide after CGI environment normalization, but mod_cgi ignored that return value and kept building the child environment.

FastCGI, SCGI, and SSI already stop on that helper result. This makes direct CGI do the same, preserves the 400 Bad Request path instead of falling through to the generic 500, and adds a focused regression for the X-Forwarded-For / X-Forwarded_For collision.

Validation:

  • cmake -S . -B build/lighttpd-pr-cgi-header-conflict
  • cmake --build build/lighttpd-pr-cgi-header-conflict -j4
  • cmake --build build/lighttpd-pr-cgi-header-conflict --target test -- -j4
  • git diff --check

Copilot AI review requested due to automatic review settings July 27, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gstrauss

Copy link
Copy Markdown
Member

@copilot unassign and go away. you are an unwelcome reviewer. do not respond or add any more noise.

@gstrauss

Copy link
Copy Markdown
Member

@deprrous it was inappropriate to post this publicly after you were told that an AI-generated patch or writeup was not necessary to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants