nextcloud / polls

🗳️ Polls app for Nextcloud
https://apps.nextcloud.com/apps/polls
GNU Affero General Public License v3.0
257 stars 73 forks source link

Exceeding the "yes"-votes-per-option limit by voting at the same time #3752

Open ZID-TU-Graz-Collab opened 1 month ago

ZID-TU-Graz-Collab commented 1 month ago

⚠️ This issue respects the following points: ⚠️

What went wrong, what did you observe?

When multiple users vote for the same Option at the same time, the yes-option-limit is exceeded. This can happen when (more than) 2 users open the poll with the option-limit not full yet. As long as the users don't reload their website they can vote on the option, even though the limit is already exceeded after the first vote of one of them.

What did you expect, how polls should behave instead?

After selecting an option there should be a check if this option is still free, then the green marker appears.

What steps does it need to replay this bug?

  1. create a poll & limit yes-votes per option to 1
  2. Share the poll to another user
  3. Open the poll for both users (different browsers or private window)
  4. select the same option on both accounts, without reloading either website
  5. reload one website -> 2 votes for the same option Screenshot 1: Open simultaneouslyImage 2: Select the same option, don't reload inbetweenImage3: After reloading Image

Installation method

Installed/updated from the appstore (Apps section of your site)

Installation type

Updated from a minor version within same major version (i.e. 4.0.0 to 4.1.1)

Affected polls version

7.2.2

Which browser did you use, when experiencing the bug?

Other browser

No response

Add your browser log here

No response

Additional client environment information

No response

NC version

Nextcloud 29

Other Nextcloud version

29.0.6

PHP engine version

PHP 8.2

Other PHP version

No response

Database engine

MariaDB

Database Engine version or other Database

No response

Which user-backends are you using?

Add your nextcloud server log here

No response

Additional environment informations

No response

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Additional Information

No response

dartcafe commented 1 month ago

With 7.2.4 the vote actually gets blocked, but without proper user feedback.

ZID-TU-Graz-Collab commented 4 weeks ago

This is already a big improvement. We can confirm, as soon as you pick an option, all other options that got their max votes filled out n the meantime get properly blocked. If you pick one of the options that has its max votes filled out, before picking another option that is still open, you are still able to exceed the limit on this specific option. Reproducible in the same way (steps 1-5) as original Bug Report.

v. 7.2.4