Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/28/2021 11:49:56 PM (4 years ago)
Author:
dcavins
Message:

BP_Invitation_Manager: Verify passed email addresses.

Ensure that incoming email addresses pass
an is_email() check.
Also fix a documentation error in BP_Invitation.

See #8139.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-invitation-manager.php

    r12915 r12916  
    9797        // Invitations must have an invitee and inviter.
    9898        if ( ! ( ( $r['user_id'] || $r['invitee_email'] ) && $r['inviter_id'] ) ) {
     99            return false;
     100        }
     101
     102        // If an email address is specified, it must be a valid email address.
     103        if ( $r['invitee_email'] && ! is_email( $r['invitee_email'] ) ) {
    99104            return false;
    100105        }
Note: See TracChangeset for help on using the changeset viewer.