Opened 8 years ago
Closed 7 years ago
#38708 closed enhancement (fixed)
Unify email length checks
Reported by: | rmccue | Owned by: | rachelbaker |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Keywords: | has-patch has-unit-tests commit | |
Focuses: | rest-api | Cc: |
Description
Right now, the comment form checks for 6 characters minimum for email addresses. In #38506, we updated the REST API to do the same.
We should update is_email()
to include this check, or change the other checks to match is_email()
. It makes no real sense to have the check in two places.
Attachments (4)
Change History (16)
#1
@
8 years ago
#2
@
8 years ago
@lukecavanagh Yep, specifically this line checking for length > 3 should be changed to > 6.
(Pro-tip: When on GitHub, hit "y" to get a permalink to lines linked to a specific commit, otherwise they can potentially change with future commits.)
#3
@
8 years ago
@rmccue
Good to know.
https://help.github.com/articles/getting-permanent-links-to-files/
#4
@
8 years ago
- Component changed from General to Mail
- Milestone changed from Future Release to 4.8
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
#7
@
7 years ago
- Keywords has-unit-tests added; needs-testing removed
In 38708.2.diff I added tests and removed the extra string length check and comments from r39158.
Can probably also remove the string length check in wp_handle_comment_submission()
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
#10
@
7 years ago
38708.patch removes the length check in wp_handle_comment_submission()
. I also noticed a length check in sanitize_email()
. Updated that one to 6 for consistency.
@rmccue
Do you just mean in?
https://github.com/WordPress/WordPress/blob/master/wp-includes/formatting.php#L2863-L2941