Page MenuHomePhabricator

Fix two very, very minor correctness issues in Slowvote
ClosedPublic

Authored by epriestley on Feb 7 2019, 5:29 PM.
Tags
None
Referenced Files
F15495641: D20125.id48044.diff
Sun, Apr 13, 5:19 AM
F15492737: D20125.id48051.diff
Sat, Apr 12, 5:48 PM
F15491513: D20125.id.diff
Sat, Apr 12, 4:30 AM
F15488905: D20125.diff
Fri, Apr 11, 4:10 AM
F15486540: D20125.id48051.diff
Thu, Apr 10, 8:04 AM
F15452802: D20125.id48044.diff
Sat, Mar 29, 7:22 AM
Unknown Object (File)
Mar 3 2025, 2:04 PM
Unknown Object (File)
Mar 2 2025, 9:42 PM
Subscribers
None

Details

Summary

See https://hackerone.com/reports/492525 and https://hackerone.com/reports/489531. I previously awarded a bounty for https://hackerone.com/reports/434116 so Slowvote is getting "researched" a lot.

  • Prevent users from undoing their vote by submitting the form with nothing selected.
  • Prevent users from racing between the delete() and save() to vote for multiple options in a plurality poll.
Test Plan
  • Clicked the vote button with nothing selected in plurality and approval polls, got an error now.
  • Added a sleep(5) between delete() and save(). Submitted different plurality votes in different windows. Before: votes raced, invalid end state. After: votes waited on the lock, arrived in a valid end state.

Diff Detail

Repository
rP Phabricator
Branch
poll1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21881
Build 29871: Run Core Tests
Build 29870: arc lint + arc unit