Skip to content

[ticket/17768] Double submit issues during poll voting - #7115

Open
marc1706 wants to merge 2 commits into
phpbb:3.3.xfrom
marc1706:ticket/17768
Open

marc1706 wants to merge 2 commits into
phpbb:3.3.xfrom
marc1706:ticket/17768

Conversation

@marc1706

@marc1706 marc1706 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

PHPBB-17768

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17768

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

The attempt to merge branch 3.3.x into master has completed after considering the changes in this PR.

  • Merge result: Success ✅

This PR is ready to be merged.

@marc1706 marc1706 added this to the 3.3.20 milestone Nov 2, 2026
@marc1706
marc1706 requested a lite review from Copilot November 3, 2026 19:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The change still has two critical active issues: guest duplicate submissions remain possible because they lack server-side transaction state, and the locking approach is not atomic on supported non-transactional table engines.

2 open issues
What changed in this PR

This pull request addresses duplicate poll submissions by validating poll options and serializing registered-user vote updates.

Changes:

  • Filters submitted vote IDs to valid poll options.
  • Adds transactional locking and duplicate-vote detection for registered users.
  • Adds a functional regression test and a duplicate-vote language string.
  • Remaining issues affect guest submissions, non-transactional database engines, and concurrent-request test coverage.
File Summary
tests/​functional/​posting_test.php Adds coverage for invalid options and repeated poll submissions, but does not exercise truly concurrent requests.
phpBB/​viewtopic.php Validates poll options and coordinates vote updates transactionally; guest requests and non-transactional engines still require handling.
phpBB/​language/​en/​viewtopic.php Adds the message displayed when a vote has already been cast.

This pull request requires changes.

Review effort: Lite

Comment thread phpBB/viewtopic.php Resolved
Comment thread phpBB/viewtopic.php Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A moderate active finding remains because the test does not reproduce the concurrent double-submit or exercise the transaction re-read branch, so it can pass against the old implementation.

1 open issue
2 resolved since last review

Review effort: Lite

Comment thread tests/functional/posting_test.php Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The fix depends on row-lock and transaction semantics across phpBB’s supported database drivers, and the race lacks automated concurrent coverage, so human validation across those engines is needed.

No open issues 🎉

1 resolved since last review

Review effort: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants