Opened 6 years ago
Closed 6 years ago
#3864 closed defect (bug) (fixed)
Plugin Directory: Submission check for existing slug needs improvement
Reported by: | Ipstenu | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | reporter-feedback |
Cc: |
Description
The submission form checks to see if a slug has been approved (so it will detect closed and disabled as well as approved and published). This prevents people from submitting Akismet over and over.
But it has some flaws. Like it doesn't check REJECTED slugs. Normally this wouldn't matter, as slugs are renamed to rejected-PLUGIN-rejected
in order to NOT lock up a slug. The problem here is that we didn't always.
Example: Yoast SEO has the slug wordpress-seo, so logically it would get by with the slug yoast-seo (which doesn't exist http://wordpress.org/plugins/yoast-seo ). Except... They get in as yoast-seo-2 (yes, 2). That's because at one point we rejected a plugin with that slug in the period of time BEFORE we fixed the slugs.
So there's a rejected yoast-seo with that slug and now everyone gets yoast-seo-2
1) We should check rejected slugs too
2) The slugger needs to be smarter and STOP if it ends with a hyphen and number (-2, -3, etc)
I'm not worried about 'legit' plugins ending in a number like that as we don't generally accept those anyway, and we can fix the slug if we have to.
Change History (8)
#2
in reply to:
↑ description
@
6 years ago
- Keywords reporter-feedback added
Replying to Ipstenu:
The slugger needs to be smarter and STOP if it ends with a hyphen and number (-2, -3, etc)
- With the check for previously rejected plugins fixed, is there still a way for a slug to end up like that?
- What exactly should happen to the upload or be displayed to the author if a slug like that is detected?
#3
@
6 years ago
With [7799], if a previously rejected plugin with the same slug exists, the uploader shows "The plugin has already been submitted" error.
Maybe it should instead rename the rejected plugin to rejected-PLUGIN-rejected
to free up the slug, for consistency with the current rejecting behavior, and then proceed with the upload?
#6
follow-up:
↓ 7
@
6 years ago
With the check for previously rejected plugins fixed, is there still a way for a slug to end up like that?
As a hyphen-number? Only when they name a plugin that on purpose, which we change anyway since that's not an accepted name. Ending a plugin in a number is too confusing for users, and we make them rename it
What exactly should happen to the upload or be displayed to the author if a slug like that is detected?
Prevent the upload and tell them a plugin already exists with that slug.
Maybe it should instead rename the rejected plugin to rejected-PLUGIN-rejected to free up the slug, for consistency with the current rejecting behavior, and then proceed with the upload?
No. There are very few plugins this affects, and those are ones that shouldn't be used.
In 7799: