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
F18780724: D19774.id47240.diff
Sun, Oct 12, 7:15 PM
F18780629: D19774.id47233.diff
Sun, Oct 12, 6:05 PM
F18780614: D19774.id.diff
Sun, Oct 12, 5:53 PM
F18780589: D19774.diff
Sun, Oct 12, 5:41 PM
F18776668: D19774.id47233.diff
Fri, Oct 10, 10:52 PM
F18769575: D19774.id47240.diff
Wed, Oct 8, 8:09 AM
F18697054: D19774.id.diff
Sat, Sep 27, 8:49 AM
F18690416: D19774.diff
Fri, Sep 26, 7:32 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable