No Code Attached Yet
avatar pmleconte
pmleconte
13 Dec 2021

Steps to reproduce the issue

In configuration, if email domain name contains accented characters, test mail doesn't send any mail, nore display any message (no success message, no error message).

Other use of phpmailer will throw "This is already a Punycode string" error.

Expected result

Test message sent and success message displayed.

Actual result

No error message, no email sent

System information (as much as possible)

Joomla 4.0.4,

Additional comments

When trying to send mail via phpmailer, libraries/vendor/algo26-matthias/idna-convert/src/Punycode/ToPunycode.php throw AlreadyPunycodeException, so email sending process stops.
As email is stored in database in 'punycode format', phpmailer will never send mail.

Replacing line 37 "throw new AlreadyPunycodeException('This is already a Punycode string', 100);" by "return false" should solve this issue.

avatar pmleconte pmleconte - open - 13 Dec 2021
avatar joomla-cms-bot joomla-cms-bot - change - 13 Dec 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Dec 2021
avatar pmleconte pmleconte - change - 13 Dec 2021
Title
[4.0]"This is already a Punycode string" when domain name contains accentued characters
[4.0]"This is already a Punycode string" when domain name contains accented characters
avatar pmleconte pmleconte - edited - 13 Dec 2021
avatar pmleconte pmleconte - change - 13 Dec 2021
The description was changed
avatar pmleconte pmleconte - edited - 13 Dec 2021
avatar pmleconte pmleconte - change - 13 Dec 2021
Title
[4.0]"This is already a Punycode string" when domain name contains accented characters
[4.0]"This is already a Punycode string" when email domain name contains accented characters
avatar pmleconte pmleconte - edited - 13 Dec 2021
avatar pmleconte pmleconte - change - 13 Dec 2021
The description was changed
avatar pmleconte pmleconte - edited - 13 Dec 2021
avatar pmleconte pmleconte - change - 13 Dec 2021
The description was changed
avatar pmleconte pmleconte - edited - 13 Dec 2021
avatar pmleconte
pmleconte - comment - 13 Dec 2021

another way to fix it is to check string before calling IdnaConvert in libraries/src/String/PunycodeHelper.php
public static function toPunycode($utfString) { if (!preg_match("/[[a-zA-Z0-9-]+$/", $utfString)) { return (new ToIdn)->convert($utfString); } return $utfString; }

avatar alikon alikon - close - 13 Dec 2021
avatar alikon
alikon - comment - 13 Dec 2021

please test #36303

avatar alikon alikon - change - 13 Dec 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-12-13 17:33:14
Closed_By alikon
avatar FrankReisenhofer
FrankReisenhofer - comment - 25 May 2022

@conseilgouz :This issue is still in version 4.1.4.

Looks like the PR was not merged.

Should I open a new Issue or can someone please reopen it.

avatar alikon alikon - change - 25 May 2022
Status Closed New
Closed_Date 2021-12-13 17:33:14
Closed_By alikon
avatar alikon alikon - reopen - 25 May 2022
avatar alikon
alikon - comment - 25 May 2022

reopened

avatar conseilgouz
conseilgouz - comment - 1 Jun 2022

This issue has been reopened, but not its PR #36303

avatar FrankReisenhofer
FrankReisenhofer - comment - 1 Jun 2022

@alikon : Could you please help here and reopen the PR #36303

avatar alikon
alikon - comment - 1 Jun 2022

done

avatar alikon alikon - change - 1 Jun 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-06-01 14:46:01
Closed_By alikon

Add a Comment

Login with GitHub to post a comment