Skip to content

Fix: X-Forwarded-For double-use and no comma#13

Merged
vjt merged 1 commit intoifad:masterfrom
stevekerrison:master
Jun 9, 2019
Merged

Fix: X-Forwarded-For double-use and no comma#13
vjt merged 1 commit intoifad:masterfrom
stevekerrison:master

Conversation

@stevekerrison
Copy link

The forwarder attempts to extend, or create, the X-Forwarded-For header. However, the logic is slightly broken and breaks the header. It does:

  1. Initialise xff to the original header value.
  2. If it's non-empty, append , to it.
  3. Append the original header again, plus clammit's own IP without any comma separation

So, in this pull request I've dealt with both of those issues with a simple modification.

HTH,
Steve.

@vjt vjt merged commit 7f6a575 into ifad:master Jun 9, 2019
@vjt
Copy link
Contributor

vjt commented Jun 9, 2019

Great, thank you!

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.

2 participants