Skip to content
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

[HOLD] Only trust last entry in x-forwarded-for by default #575

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

john-westcott-iv
Copy link
Member

No description provided.

@john-westcott-iv john-westcott-iv added the Ready for review This PR is ready for review either initially or comments have been address label Aug 20, 2024
return [value]
remote_hosts.append(value)
if get_first_only:
return [remote_hosts[0]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we guaranteed that there's at least one element in remote_hosts here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call out, we should be because REMOTE_ADDR should always be set. But I'll add a check just incase.

Copy link

sonarcloud bot commented Aug 22, 2024

@john-westcott-iv john-westcott-iv changed the title Only trust last entry in x-forwarded-for by default [HOLD] Only trust last entry in x-forwarded-for by default Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:lib Ready for review This PR is ready for review either initially or comments have been address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants