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

Improve url validation to check duplicate protocol #900

Merged
merged 5 commits into from
Apr 10, 2025

Conversation

nikunj8866
Copy link
Contributor

@nikunj8866 nikunj8866 commented Mar 28, 2025

Improved is_valid_url() to detect duplicated protocol in URLs.

This PR enhances the is_valid_url() function to identify and reject URLs that contain duplicated protocols (e.g., https://http://example.com/).

Fixes #890

Copy link

github-actions bot commented Mar 28, 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.

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: nikunj8866 <[email protected]>
Co-authored-by: davidperezgar <[email protected]>
Co-authored-by: ernilambar <[email protected]>

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

@nikunj8866
Copy link
Contributor Author

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: nikunj8866 <[email protected]>
Co-authored-by: ernilambar <[email protected]>

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

Instead of nikunj8866 [email protected], Use @nikunj8866 WordPress profile.

@ernilambar
Copy link
Member

@nikunj8866 Thanks for the PR. Can you please add PHP Unit test also?

@davidperezgar davidperezgar added this to the 1.5.0 milestone Apr 6, 2025
@ernilambar ernilambar merged commit 6699d54 into WordPress:trunk Apr 10, 2025
27 checks passed
@ernilambar ernilambar added [Type] Bug An existing feature is broken [Team] Plugin Review Issues owned by Plugin Review Team labels Apr 10, 2025
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] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve URL validation
3 participants