Skip to content

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

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

Tests: limit conn and limit req reject an overlong key#87
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants