Skip to content

Increase security of X-Forwarded-For header usage by using last ip by default #20341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 10, 2023

Conversation

bx80
Copy link
Contributor

@bx80 bx80 commented Feb 9, 2023

Description:

PR #17765 already added support to use the last ip in the X-Forwarded header list by adding the proxy_ip_read_last_in_list config option, but by default it is false.

This PR changes the default global.ini.php value to proxy_ip_read_last_in_list = 1

As this is a potentially breaking change, the following tasks are also need to be completed:

✔️ Developer change log updated
✔️ Update the guide in https://matomo.org/faq/how-to-install/faq_98/ to mention people may need to disable this feature if the first IP should be used.

Fixes #17202

Review

@bx80 bx80 added the 5.0.0 label Feb 9, 2023
@bx80 bx80 added this to the 5.0.0 milestone Feb 9, 2023
@bx80 bx80 self-assigned this Feb 9, 2023
@bx80 bx80 added the Needs Review PRs that need a code review label Feb 9, 2023
@sgiehl sgiehl removed the Needs Review PRs that need a code review label Feb 9, 2023
@sgiehl
Copy link
Member

sgiehl commented Feb 9, 2023

@bx80 Once UI test might need an update
Otherwise feel free to merge this one, once the FAQ has been updated

@bx80 bx80 merged commit 9e80c62 into 5.x-dev Feb 10, 2023
@bx80 bx80 deleted the m17202-x-forward-toggle-default branch February 10, 2023 02:20
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Development

Successfully merging this pull request may close these issues.

Matomo can be tricked to record spoofed X-Forwarded-For IPs
2 participants