Skip to content

Improve url validation to check duplicate protocol#900

Merged
ernilambar merged 5 commits into
WordPress:trunkfrom
nikunj8866:fix/890-improve-url-validation
Apr 10, 2025
Merged

Improve url validation to check duplicate protocol#900
ernilambar merged 5 commits into
WordPress:trunkfrom
nikunj8866:fix/890-improve-url-validation

Conversation

@nikunj8866

@nikunj8866 nikunj8866 commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Mar 28, 2025

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.

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 <nikunj8866@git.wordpress.org>
Co-authored-by: davidperezgar <davidperez@git.wordpress.org>
Co-authored-by: ernilambar <rabmalin@git.wordpress.org>

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

@nikunj8866

Copy link
Copy Markdown
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 <nikunj8866@git.wordpress.org>
Co-authored-by: ernilambar <rabmalin@git.wordpress.org>

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

Instead of nikunj8866 nikunj8866@git.wordpress.org, Use @nikunj8866 WordPress profile.

@ernilambar

Copy link
Copy Markdown
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
@ernilambar ernilambar added [Type] Bug An existing feature is broken [Team] Plugins Issues owned by Plugins 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] Plugins Issues owned by Plugins 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