Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for unsupported plugin name in plugin header field #825

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

ernilambar
Copy link
Member

Fixes #805

@ernilambar ernilambar marked this pull request as ready for review December 10, 2024 07:07
Copy link

github-actions bot commented Dec 10, 2024

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ernilambar <[email protected]>
Co-authored-by: davidperezgar <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: frantorres <[email protected]>

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

@ernilambar
Copy link
Member Author

ernilambar commented Dec 10, 2024

Tests are failing due to unrelated issue with this PR.

Edit: Tests are passing now.

@ernilambar ernilambar added [Type] Enhancement A suggestion for improvement of an existing feature [Team] Plugin Review Issues owned by Plugin Review Team labels Dec 10, 2024
@ernilambar ernilambar added this to the 1.4.0 milestone Dec 10, 2024
@ernilambar ernilambar force-pushed the 805-plugin-name-non-unicode branch from 54a8faa to 4297bec Compare January 7, 2025 11:55
@ernilambar ernilambar force-pushed the 805-plugin-name-non-unicode branch from 4297bec to e239e48 Compare January 7, 2025 11:55
@ernilambar
Copy link
Member Author

ernilambar commented Jan 7, 2025

@frantorres has suggested to modify the conditional and make less strict. Like:

Check if plugin name "has at least 5 latin letters (A-z), numbers, spaces, and hyphens" and not worry if there are other non valid characters around.

@davidperezgar
Copy link
Member

I think that you meant @frantorres

@ernilambar
Copy link
Member Author

ernilambar commented Jan 8, 2025

I have updated the conditional to make less strict. Current message looks off after new conditional:

The "Plugin Name" header in the plugin file is not valid. It may only contain latin letters (A-z), numbers, spaces, and hyphens.

Can you please suggest updated message?

@frantorres
Copy link
Contributor

Maybe

The "Plugin Name" header in the plugin file is not valid. It needs to contain at least 5 latin letters (a-Z) and/or numbers. This is necessary because the initial plugin slug is generated from the name.

@ernilambar ernilambar merged commit e927b04 into trunk Jan 8, 2025
27 checks passed
@ernilambar ernilambar deleted the 805-plugin-name-non-unicode branch January 8, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Team] Plugin Review Issues owned by Plugin Review Team [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restrict plugin name with all unsupported characters
4 participants