No Code Attached Yet bug
avatar brucescherzinger
brucescherzinger
29 Jul 2026

What happened?

I have a custom Convert Forms PHP script that has worked for years that suddenly no longer does. It fails on a call to $mailer->addRecipient($email_address). The error it reports is "Prohibited input U+0000002C", which indicates there is a comma in $email_address, when that is absolutely not the case.

Version

6.1.2

Expected result

I expect the addRecipient() call to work as it has for the past 3 years and the subsequent email to be sent and not make my script fail.

Actual result

I have gone as far as "cleaning" $email_address to ensure there are no hidden characters, but nothing made a difference. This error is causing my script to die at this point. Enabling debug and maximum error reporting provided no traceback or other information.

System Information

Setting Value
Joomla! Version Joomla! 6.1.2 Stable [ Nyota ] 7-July-2026 16:00 UTC
Joomla Backward Compatibility Plugin Enabled (classes_aliases:"1", legacy_classes:"1")
PHP Version 8.3.31
PHP Built On Linux na8861.serversignin.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
Database Type mysql
Database Version 11.4.12-MariaDB
Database Collation utf8mb4_unicode_ci
Database Connection Collation utf8mb4_general_ci

Additional Comments

No response

avatar brucescherzinger brucescherzinger - open - 29 Jul 2026
avatar joomla-cms-bot joomla-cms-bot - change - 29 Jul 2026
Labels Added: No Code Attached Yet bug
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 Jul 2026
avatar brianteeman
brianteeman - comment - 29 Jul 2026

We've had this before. You should be able to find it with search.

avatar brucescherzinger brucescherzinger - change - 29 Jul 2026
The description was changed
avatar brucescherzinger brucescherzinger - edited - 29 Jul 2026
avatar brucescherzinger
brucescherzinger - comment - 29 Jul 2026

We've had this before. You should be able to find it with search.

I searched here for that character code but got no result. I would think that should be the unique identifier for a search. Otherwise, if you have another keyword...

avatar brianteeman
brianteeman - comment - 29 Jul 2026

Search for prohibited input in both issues and pr including closed

avatar brucescherzinger
brucescherzinger - comment - 29 Jul 2026

Search for prohibited input in both issues and pr including closed

I can see why that tickled a memory for you, Brian, but those other cases are unrelated to the Mailer class (except one very old one for setSender, which is not the method involved here; that part seems to be working).

avatar joomdonation
joomdonation - comment - 29 Jul 2026

@brucescherzinger Wrap your code inside \Joomla\CMS\MailMailHelper::isEmailAddress($email_address) check and you should be safe. Something with Punycode, but I do not remember exactly what's the list of forbidden characters

avatar brucescherzinger
brucescherzinger - comment - 29 Jul 2026

\Joomla\CMS\MailMailHelper::isEmailAddress($email_address)

I am already doing this. Is this not sufficient?
$submitter_email = filter_var($requested->submitter_email, FILTER_SANITIZE_EMAIL);

avatar brucescherzinger
brucescherzinger - comment - 29 Jul 2026

\Joomla\CMS\Mail\MailHelper::isEmailAddress($email_address)

I am already doing this. Is this not sufficient?
$submitter_email = filter_var($requested->submitter_email, FILTER_SANITIZE_EMAIL);

Your recommended check yielded 1.

avatar brianteeman
brianteeman - comment - 29 Jul 2026

If it helps the problem is a , comma in an email address

avatar brucescherzinger
brucescherzinger - comment - 29 Jul 2026

If it helps the problem is a , comma in an email address

I'm aware. There is no comma.

avatar joomdonation
joomdonation - comment - 29 Jul 2026

$submitter_email = filter_var($requested->submitter_email, FILTER_SANITIZE_EMAIL);

I never used that myself, so honestly, I do not know. I guess that filter will only remove invalid characters from the variable, the returned string might still not a valid email. You better use MailHelper::isEmailAddress check as I suggested earlier

avatar brucescherzinger
brucescherzinger - comment - 29 Jul 2026

Interesting...apparently, my debug statement was not well-placed enough. It was actually dying on addCC, the input parameter for which DID include a comma. Apologies for the runaround.

THIS TICKET CAN BE CLOSED.

avatar joomdonation joomdonation - change - 29 Jul 2026
Status New Closed
Closed_Date 0000-00-00 00:00:00 2026-07-29 14:43:58
Closed_By joomdonation
avatar joomdonation joomdonation - close - 29 Jul 2026
avatar joomdonation
joomdonation - comment - 29 Jul 2026

Great, thanks for the update. I'm closing the issue

avatar brianteeman
brianteeman - comment - 29 Jul 2026

glad you fixed it

avatar brucescherzinger
brucescherzinger - comment - 29 Jul 2026

One thing I did notice when looking at the core code in Mail.php is that if a single (non-array) address is passed into addRecipient (likely others), the add() method does not bother to process the name parameter as an array (or in any other way). It simply passes it along to \call_user_func (line 303), which could cause issues if someone does pass name as an array. Maybe not a big deal, but just something I noticed.

Add a Comment

Login with GitHub to post a comment