Make WordPress Core


Ignore:
Timestamp:
05/14/2017 04:19:51 AM (8 years ago)
Author:
rachelbaker
Message:

Formatting: Increase minimum characters allowed in is_email() to 6.

Brings the minimum characters expected for a valid email address to six, which matches the expectations in wp_handle_comment_submission() and REST API email arguments.

Props rmccue, lukecavanagh, rachelbaker, desrosj, sudar.
Fixes #38708.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r40626 r40667  
    28732873
    28742874    // Test for the minimum length the email can be
    2875     if ( strlen( $email ) < 3 ) {
     2875    if ( strlen( $email ) < 6 ) {
    28762876        /**
    28772877         * Filters whether an email address is valid.
     
    31103110function sanitize_email( $email ) {
    31113111    // Test for the minimum length the email can be
    3112     if ( strlen( $email ) < 3 ) {
     3112    if ( strlen( $email ) < 6 ) {
    31133113        /**
    31143114         * Filters a sanitized email address.
Note: See TracChangeset for help on using the changeset viewer.