Skip to content

Commit

Permalink
Make sure the ballot raw data is also changed. (#467)
Browse files Browse the repository at this point in the history
* Make sure the ballot raw data is also changed.
only export the non-spoiled ballots

* updated version number
  • Loading branch information
SteveMaier-IRT committed Sep 14, 2023
1 parent 5f2ac24 commit 36c0be3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public async Task<List<BallotRecord>> GetByElectionIdAsync(string electionId)
/// <param name="electionId">election id to search for</param>
public async Task<IAsyncCursor<BallotRecord>> GetCursorByElectionIdAsync(string electionId)
{
var filter = FilterBuilder.Eq(Constants.ElectionId, electionId);
var filter = FilterBuilder.And(
FilterBuilder.Eq(Constants.ElectionId, electionId),
FilterBuilder.Ne(Constants.BallotState, BallotBoxState.Spoiled));
return await GetCursorByFilterAsync(filter);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ApplicationIdGuid>c0679a79-bc22-46ad-9c49-93de983e3fa2</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.91.15</ApplicationDisplayVersion>
<ApplicationDisplayVersion>1.91.16</ApplicationDisplayVersion>
<ApplicationVersion>14</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.3</SupportedOSPlatformVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap rescap">

<Identity Name="ElectionGuard.Admin" Publisher="CN=Microsoft" Version="1.91.15.0" />
<Identity Name="ElectionGuard.Admin" Publisher="CN=Microsoft" Version="1.91.16.0" />

<mp:PhoneIdentity PhoneProductId="F7E69798-9268-43DC-A51E-3A95FA4992AD" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ private async Task Upload()
try
{
var filename = Path.GetFileName(currentBallot);
var ballotData = await ReadFileAsync(currentBallot, cancellationToken);
using var ballot = new CiphertextBallot(RemoveSpoiled(ballotData));
var ballotOriginalData = await ReadFileAsync(currentBallot, cancellationToken);
var ballotData = RemoveSpoiled(ballotOriginalData);
using var ballot = new CiphertextBallot(ballotData);
if (ballot.Timestamp < startDate)
{
Expand Down

0 comments on commit 36c0be3

Please sign in to comment.