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

Properly Implement StringSegment and StringSegmentComparer GetHashCode #232

Closed
Tratcher opened this issue May 22, 2017 · 1 comment
Closed

Comments

@Tratcher
Copy link
Member

#213
StringSegment.GetHashCode and StringSegmentComparer.GetHashCode(StringSegment) both substring and then string.GetHashCode() which defeats the purpose of using StringSegment.

Note that .NET Core strings use randomized hash codes to mitigate issues like dictionary hash collision attacks.

The header parsers in HttpAbstractions call both of these methods the header value types GetHashCode implementations, but I'm not aware of any instances where those header value types are used as keys into hashed collections.

@Tratcher Tratcher added the bug label May 22, 2017
@Tratcher Tratcher changed the title Properly Implement StringSegment.GetHashCode Properly Implement StringSegment and StringSegmentComparer GetHashCode May 22, 2017
@Eilon Eilon added this to the 2.1.0 milestone Jun 6, 2017
@Eilon Eilon removed the bug label Jun 6, 2017
@aspnet-hello
Copy link

This issue was moved to aspnet/Home#2365

@dotnet dotnet locked and limited conversation to collaborators Jan 1, 2018
@aspnet-hello aspnet-hello removed this from the 2.1.0-preview1 milestone Jan 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants