discourse/plugins
Charles Lechasseur 14ee6bd67d
FIX: Avoid returning duplicate voters from /polls/voters.json endpoint (#34433)
When fetching voters from the `/polls/voters.json` API endpoint, each
page after the first has an extra voter (the last one from the previous
page). This causes duplicate voters to be returned if loading multiple
pages. This PR fixes the off-by-one error that causes this. (This fix
has initially been proposed by Rob Mackenzie.)

The PR also fixes an issue that could cause non-deterministic ordering
of results from that API; however, I have not been able to craft a test
to reproduce the issue, so the fix is theoretical.

Reported here:
https://meta.discourse.org/t/polls-voters-json-returning-duplicate-users-across-paged-requests/376636
2025-09-30 15:06:01 +08:00
..
automation DEV: Replace deprecated Ember's array filterBy with filter (#35018) 2025-09-29 16:42:38 -03:00
chat SECURITY: Rich editor chat transcript XSS 2025-09-30 10:09:43 +08:00
checklist DEV: Silence post-stream-widget-overrides in the checklist plugin (#33743) 2025-07-22 14:47:33 -03:00
discourse-adplugin DEV: Normalize route and namespace setup in plugins (#34962) 2025-09-25 12:35:29 +02:00
discourse-affiliate DEV: Clean up requires (#34946) 2025-09-24 12:00:22 +02:00
discourse-ai SECURITY: AI helper suggestions based on a topic should check user has access to it 2025-09-30 10:09:49 +08:00
discourse-apple-auth Update translations (#34839) 2025-09-24 14:48:18 +02:00
discourse-assign Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-calendar DEV: Replace deprecated Ember's array filterBy with filter (#35018) 2025-09-29 16:42:38 -03:00
discourse-chat-integration Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-data-explorer DEV: Replace Ember's deprecated mapBy with standard .map (#34963) 2025-09-26 12:59:35 -03:00
discourse-details Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-gamification DEV: Replace deprecated Ember's array sortBy with sort (#34998) 2025-09-26 13:38:26 -03:00
discourse-github Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-graphviz Update translations (#34537) 2025-08-26 16:12:30 +02:00
discourse-hcaptcha Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-lazy-videos DEV: Fix random typos (#34987) 2025-09-26 09:52:28 +08:00
discourse-local-dates DEV: Normalize route and namespace setup in plugins (#34962) 2025-09-25 12:35:29 +02:00
discourse-login-with-amazon DEV: Remove unnecessary rails_helper requires (#33812) 2025-07-24 13:50:04 +02:00
discourse-lti FIX: Don’t store return path in the session 2025-09-19 10:05:20 +02:00
discourse-math Update translations (#34537) 2025-08-26 16:12:30 +02:00
discourse-microsoft-auth DEV: Fix random typos (#34987) 2025-09-26 09:52:28 +08:00
discourse-narrative-bot Update translations (#34839) 2025-09-24 14:48:18 +02:00
discourse-oauth2-basic Update translations (#34804) 2025-09-15 10:47:22 +02:00
discourse-openid-connect Update translations (#34413) 2025-08-19 16:23:59 +02:00
discourse-patreon Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-policy Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-post-voting DEV: Replace deprecated Ember's array filterBy with filter (#35018) 2025-09-29 16:42:38 -03:00
discourse-presence Update translations (#34482) 2025-08-22 17:11:31 +02:00
discourse-reactions DEV: Add basic system spec for discourse-reaction on post (#35029) 2025-09-30 10:29:34 +10:00
discourse-rss-polling DEV: Normalize route and namespace setup in plugins (#34962) 2025-09-25 12:35:29 +02:00
discourse-solved Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-subscriptions DEV: Replace deprecated Ember's array filterBy with filter (#35018) 2025-09-29 16:42:38 -03:00
discourse-templates DEV: Normalize route and namespace setup in plugins (#34962) 2025-09-25 12:35:29 +02:00
discourse-topic-voting Update translations (#35031) 2025-09-29 10:26:53 +02:00
discourse-user-notes DEV: Trigger event after user warning is created (#34997) 2025-09-26 14:27:58 -03:00
discourse-zendesk-plugin DEV: Normalize route and namespace setup in plugins (#34962) 2025-09-25 12:35:29 +02:00
footnote UX: add class to inline-footnote to display as inline-block (#34515) 2025-08-25 13:17:55 +02:00
poll FIX: Avoid returning duplicate voters from /polls/voters.json endpoint (#34433) 2025-09-30 15:06:01 +08:00
spoiler-alert Update translations (#35031) 2025-09-29 10:26:53 +02:00
styleguide DEV: Replace Ember's deprecated mapBy with standard .map (#34963) 2025-09-26 12:59:35 -03:00