Election-Tech-Initiative / Election-Tech-Initiative/electionguard-core2
🐞 InternalManifest IEquatable does not validate internal structure of manifest
- Dominant language
- C#
- Stars
- 14
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
equality only checks that gpunit size contest size and ballot style size match but does not inspect the equality of each colection member.
### Expected Behavior
equality should check all members
```csharp
if (!isEqual)
{
return isEqual;
}
for (ulong i = 0; i < GeopoliticalUnitsSize; i++)
{
isEqual = isEqual && GetGeopoliticalUnitAtIndex(i).Equals(other.GetGeopoliticalUnitAtIndex(i));
}
for (ulong i = 0; i < ContestsSize; i++)
{
isEqual = isEqual && GetContestAtIndex(i).Equals(other.GetContestAtIndex(i));
}
for (ulong i = 0; i < BallotStylesSize; i++)
{
isEqual = isEqual && GetBallotStyleAtIndex(i).Equals(other.GetBallotStyleAtIndex(i));
}
```
### Steps To Reproduce
_No response_
### Environment
```markdown
- OS:
```
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.