Skip to content

Improve URL validation for plugin header fields #998

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

Merged
merged 3 commits into from
Jul 12, 2025

Conversation

ernilambar
Copy link
Member

@ernilambar ernilambar commented Jul 4, 2025

Fixes #997

In this PR:

  • URL_Utils trait is introduced as URL helpers are needed in multiple checks
  • Filter wp_plugin_check_discouraged_domains introduced to make domains customizable
  • Validation applied for AuthorURI also
  • Regex will accommodate more variations now
  • Tests are also updated

@ernilambar ernilambar force-pushed the 997-improve-url-validation branch from f79412a to 395a244 Compare July 4, 2025 09:48
@ernilambar ernilambar marked this pull request as ready for review July 4, 2025 09:48
Copy link

github-actions bot commented Jul 4, 2025

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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @luckaty.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

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

Unlinked contributors: luckaty.

Co-authored-by: ernilambar <[email protected]>
Co-authored-by: davidperezgar <[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 ernilambar added this to the 1.6.0 milestone Jul 4, 2025
@ernilambar ernilambar added [Type] Bug An existing feature is broken [Team] Plugins Issues owned by Plugin Review Team labels Jul 4, 2025
@ernilambar ernilambar merged commit 9d2f354 into trunk Jul 12, 2025
37 of 50 checks passed
@ernilambar ernilambar deleted the 997-improve-url-validation branch July 12, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Team] Plugins Issues owned by Plugin Review Team [Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make regex more robust for checking URL
3 participants