Skip to content

w2p_Utilities_Mail::Cc()/Bcc() drop single addresses, and Bcc recipients are added as Cc #425

Closed

Description

@caseysoftware

Found on the dev-6.0.0 branch (local, at 9bd3a1e0) during the lib/ cleanup. It may be on master too: the same code is there.

classes/w2p/Utilities/Mail.class.php:

  • Cc() (L198) and Bcc() (L222) have the ternary backwards: (is_array($cc)) ? explode(',', $cc) : $cc. A string address (the normal case) stays a string, so CheckAddresses() and the foreach raise "foreach() argument must be of type array|object" and no recipient is added. An array would be passed to explode().
  • Bcc() adds its addresses with AddCC() (L236), so if it did work, blind-copy recipients would be visible to everyone as Cc.

Fix: $this->acc = is_array($cc) ? $cc : explode(',', $cc); (same for $bcc, with trim() on each address), and use addBCC() in Bcc().

Activity

  1. added
    php
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 21, 2026
    3c6ebcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    phpsecurity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions