dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.58k stars 25.3k forks source link

Why GetAddressBytes() in ClientIpSafeList Middleware? #21548

Open c0d3sling3r opened 3 years ago

c0d3sling3r commented 3 years ago

Why did you first convert safeList and remote IP Address to bytes[] before comparison instead of using the IP address as it is in string format and then check the strings?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Rick-Anderson commented 3 years ago

@damienbod ?

damienbod commented 3 years ago

@Rick-Anderson @shojajou Looking back, I don't know why, this could be done better, I'll revisit this, this can be improved.

Greetings Damien

c0d3sling3r commented 3 years ago

@Rick-Anderson @shojajou Looking back, I don't know why, this could be done better, I'll revisit this, this can be improved.

Greetings Damien

Thank you for your reply. Any future improvements on your work will be pleasant.