Skip to content

Plugin Directory: Strengthen duplicate-submission prevention on upload#733

Closed
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:plugin-directory/upload-duplicate-check
Closed

Plugin Directory: Strengthen duplicate-submission prevention on upload#733
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:plugin-directory/upload-duplicate-check

Conversation

@obenland

@obenland obenland commented Jul 23, 2026

Copy link
Copy Markdown
Member

Follow-up to the duplicate-submission hardening in #698.

The per-user upload lock keeps a single submitter from creating duplicates via double-clicks or reloads, but the final duplicate check and post creation aren't otherwise coordinated, so two submissions of the same new plugin can each pass the earlier checks and land as separate queue entries.

This adds a short-lived, per-slug guard (wp_cache_add, same primitive as the existing lock) around the final check-and-create step: the slug is claimed for the moment it takes to re-check for an existing plugin and create the post, then released. If the slug is already claimed, or a matching plugin now exists, the submission is rejected with a transient "currently being processed, please try again in a moment" notice — on retry, the regular duplicate checks then produce the appropriate permanent error.

Scope:

  • New submissions only; updates to existing plugins are untouched.
  • No change to the checks themselves, just their coordination.
  • Reuses the existing object-cache primitive, so no new infrastructure.

Result: fewer duplicate entries in the review queue and less manual triage for the plugins team.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 23, 2026 16:06

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props obenland.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@obenland
obenland force-pushed the plugin-directory/upload-duplicate-check branch 7 times, most recently from 303ce1d to 6452114 Compare July 23, 2026 17:08
Add a short-lived per-slug guard around the final duplicate check and post
creation, so that simultaneous submissions of the same new plugin don't each
create a separate entry in the review queue. Complements the existing per-user
upload lock.
@obenland
obenland force-pushed the plugin-directory/upload-duplicate-check branch from 6452114 to f9852f3 Compare July 23, 2026 18:03
@obenland obenland closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants