Opened 8 years ago
Last modified 4 years ago
#39133 new enhancement
Check email length in is_email()
Reported by: | PranaliPatel | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Comments | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
In reference to this ticket - https://core.trac.wordpress.org/ticket/38506#comment:12
It would be better to check email length within the is_email() itself instead of
validating it at various other places.
Attachments (5)
Change History (13)
@
8 years ago
As we are checking validation in is_email(), we can remove the string length check from the wp_handle_comment_submission().
@
8 years ago
Removed email length check from rest-api as we are checking length in is_email() function already
#5
@
8 years ago
There should be a dedicated test for the new length test in is_email()
(see Tests_Formatting_IsEmail
), not just one handling comments. Also, since one patch changes code in the REST API, that part should get coverage as well.
#6
@
5 years ago
- Keywords needs-unit-tests added; has-unit-tests removed
Just re-adding the needs unit tests label back.
#7
@
4 years ago
I added a patch via GitHub PR but for some reason it's not showing here. https://github.com/WordPress/wordpress-develop/pull/413
Here's the patch - https://github.com/WordPress/wordpress-develop/pull/413.patch
I'll attach it as patch here as well.
Check email length ( to minimum of 5 )