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

Records Incorrect IP Address - IPv6 not supported #2521

Closed
mic-max opened this issue Jan 18, 2022 · 0 comments
Closed

Records Incorrect IP Address - IPv6 not supported #2521

mic-max opened this issue Jan 18, 2022 · 0 comments
Assignees
Labels

Comments

@mic-max
Copy link
Contributor

mic-max commented Jan 18, 2022

  • List of NuGet packages and version that you are using:
  • Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the *.csproj file):
  • Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):

Describe the bug

A clear and concise description of what the bug is.

X-Forwarded-For is specified with an IPv6 IP address and we return just the first 4 characters.

  • X-Forwarded-For : 180.60.62.8:36608 becomes 180.60.62.8
  • X-Forwarded-For : 2400:4151:f82:3000:8d8:f068:5c34:824, 147.243.22.167:52155 becomes 2400

There is an inconsistency between the ASP NET and .NET Core implementations:

One uses LastIndexOf and other other uses IndexOf to find the : character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant