Tests: limit conn and limit req reject an overlong key - #87
Draft
VadimZhestikov wants to merge 2 commits into
Draft
Tests: limit conn and limit req reject an overlong key#87VadimZhestikov wants to merge 2 commits into
VadimZhestikov wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds cases to
limit_conn.tandlimit_req.tverifying 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