Page MenuHomePhabricator

Prevent users from voting for invalid Slowvote options
ClosedPublic

Authored by epriestley on Nov 5 2018, 6:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 2, 7:12 PM
Unknown Object (File)
May 11 2025, 8:50 PM
Unknown Object (File)
May 11 2025, 8:49 PM
Unknown Object (File)
May 11 2025, 8:49 PM
Unknown Object (File)
May 7 2025, 12:13 AM
Unknown Object (File)
Apr 22 2025, 12:12 AM
Unknown Object (File)
Apr 17 2025, 1:35 AM
Unknown Object (File)
Apr 15 2025, 9:51 AM
Subscribers
None

Details

Summary

Depends on D19773. See https://hackerone.com/reports/434116. You can currently vote for invalid options by submitting, e.g., vote[]=12345.

By doing this, you can see the responses, which is sort of theoretically a security problem? This is definitely a bug, regardless.

Instead, only allow users to vote for options which are actually part of the poll.

Test Plan
  • Tried to vote for invalid options by editing the form to vote[]=12345 (got error).
  • Tried to vote for invalid options by editing the radio buttons on a plurality poll into checkboxes, checking multiple boxes, and submitting (got error).
  • Voted in approval and plurality polls the right way, from the main web UI and from the embed ({V...}) UI.

Diff Detail

Repository
rP Phabricator
Branch
xvote2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21082
Build 28649: Run Core Tests
Build 28648: arc lint + arc unit