Skip to content

Tests: limit conn and limit req reject an overlong key - #87

Closed
VadimZhestikov wants to merge 2 commits into
nginx:masterfrom
VadimZhestikov:test/limit-overlong-key-failclosed
Closed

VadimZhestikov wants to merge 2 commits into
nginx:masterfrom
VadimZhestikov:test/limit-overlong-key-failclosed

Conversation

@VadimZhestikov

Copy link
Copy Markdown
Contributor

Adds cases to limit_conn.t and limit_req.t verifying that a request whose evaluated key exceeds the storable length (255 bytes for limit_conn, 65535 for limit_req) is rejected with the configured status rather than silently skipping the limit (fail-open).

Uses a header-based key ($http_x_key); the overlong-key assertions are TODO-guarded until the corresponding code change is released. A short key is checked to pass as a baseline.

Code PR: nginx/nginx#1583

When the evaluated key exceeds the storable length (255 bytes for
limit_conn, 65535 for limit_req) the request must be rejected with the
configured status instead of silently skipping the limit.

The overlong-key checks are marked TODO until the corresponding change
is released.
When the evaluated key exceeds the storable length (255 bytes) the
connection must be rejected instead of silently skipping the limit.

The overlong-key check is marked TODO until the corresponding change is
released.
@VadimZhestikov

Copy link
Copy Markdown
Contributor Author

Closing: the corresponding change, nginx/nginx#1583, was declined -- the current behaviour for overlong keys is intentional.

@github-project-automation github-project-automation Bot moved this from In Progress to Done in NGINX OSS Unified Workspace Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants