Skip to content

Harden trusted proxy count parsing#85

Open
Autowebassat-blip wants to merge 1 commit into
profullstack:masterfrom
Autowebassat-blip:fix-trusted-proxy-count-parsing
Open

Harden trusted proxy count parsing#85
Autowebassat-blip wants to merge 1 commit into
profullstack:masterfrom
Autowebassat-blip:fix-trusted-proxy-count-parsing

Conversation

@Autowebassat-blip

Copy link
Copy Markdown

Fixes a middleware rate-limit IP selection edge case where TRUSTED_PROXY_COUNT values like 1abc were accepted by parseInt as 1.

This could make the app trust X-Forwarded-For when the environment value is malformed. The patch requires a positive integer and adds unit coverage for malformed values.

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