This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
SlicesAsSets option behaves poorly with duplicate items in the slice #36
Comments
The code sample looks correct to me—if the slice list members are the same and the set option is turned on, then the two arrays should produce the same hash. If this happens with the set option off, then there is clearly a bug. Or perhaps, I do not understand the set option |
They're not the same though, look at the last two members of each slice.
|
My apologies, I apparently can't see straight. |
michaelbeaumont
added a commit
to michaelbeaumont/hashstructure
that referenced
this issue
Jan 5, 2023
michaelbeaumont
added a commit
to michaelbeaumont/hashstructure
that referenced
this issue
Jan 5, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If two slices differ only by an item that is repeated in both, it's trivial to construct hash collisions.
The text was updated successfully, but these errors were encountered: