Skip to content

fix: deny ranges take precedence over allow ranges - #296

Open
AruneshDwivedi wants to merge 1 commit into
stripe:masterfrom
AruneshDwivedi:fix/deny-precedence-over-allow
Open

fix: deny ranges take precedence over allow ranges#296
AruneshDwivedi wants to merge 1 commit into
stripe:masterfrom
AruneshDwivedi:fix/deny-precedence-over-allow

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

classifyAddr evaluated AllowRanges before DenyRanges, so an address denied by --deny-address (appended to DenyRanges) was still allowed whenever it also matched an --allow-range. The order is swapped so a denied address is always rejected. Extended TestSelectTargetAddr with cases where an allow range overlaps a denied address.

classifyAddr checked AllowRanges before DenyRanges, so an address
explicitly denied via --deny-address (or --deny-range) was still allowed
when it also fell inside an --allow-range. Check DenyRanges first so a
denied address is always rejected regardless of any allow range.

Fixes stripe#236

Signed-off-by: Arunesh Dwivedi <[email protected]>
@cla-assistant

cla-assistant Bot commented Jul 20, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant