[wp-trac] [WordPress Trac] #40353: Site URL and Home URL inputs are not properly validating
WordPress Trac
noreply at wordpress.org
Mon Jun 26 19:11:58 UTC 2017
#40353: Site URL and Home URL inputs are not properly validating
--------------------------------------+------------------------------
Reporter: subrataemfluence | Owner: loru88
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses: administration
--------------------------------------+------------------------------
Comment (by loru88):
Replying to [comment:10 swissspidy]:
> @umangvaghela123 As mentioned earlier in the ticket, `filter_var()`
can't be used because it could be turned off in PHP 5.2.
>
> [attachment:40353.4.patch] looks a bit messy because it removes
existing unit tests and the regex in `is_valid_wordpress_url()` is way too
complex for this IMHO.
It does not remove any existing unit test, I just take the email
validation test as a template to start but I probably mess with git. I'll
fix it as soon as I can.
The function "is_valid_wordpress_url" is complex because I think it could
be useful for plugin and theme authors, just like any other
[https://developer.wordpress.org/plugins/security/data-validation/ data
validation] function in wordpress core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40353#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list