You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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.
The text was updated successfully, but these errors were encountered:
Tratcher
changed the title
Properly Implement StringSegment.GetHashCode
Properly Implement StringSegment and StringSegmentComparer GetHashCode
May 22, 2017
#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.
The text was updated successfully, but these errors were encountered: