? ? Pending

User tests: Successful: Unsuccessful:

avatar pmleconte
pmleconte
13 Dec 2021

Don't convert domain to punycode if domain is already a Punycode string

Pull Request for Issue #36301 .

Summary of Changes

Testing Instructions

In Global Configuration, Server tab, in mail section, update "from email" parameter so that domain name contains one or more accented character. Click on "Send TestMail".

Actual result BEFORE applying this Pull Request

Nothing happens : no error, no email sent

Expected result AFTER applying this Pull Request

a message "The email was sent to ..." is displayed and, if domain exists, you should receive an email.

Documentation Changes Required

Votes

# of Users Experiencing Issue
2/2
Average Importance Score
4.00

avatar pmleconte pmleconte - open - 13 Dec 2021
avatar pmleconte pmleconte - change - 13 Dec 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Dec 2021
Category Libraries
avatar pmleconte pmleconte - change - 13 Dec 2021
Title
[4.0] Update PunycodeHelper.php
[4.0] AlreadyPunycodeException exception in email test
avatar pmleconte pmleconte - edited - 13 Dec 2021
avatar pmleconte pmleconte - change - 13 Dec 2021
Labels Added: ?
avatar infograf768
infograf768 - comment - 14 Dec 2021

Tested with
infograf@avélaccent.fr

Before patch, we get the error
An error has occurred while fetching the JSON data: HTTP 0 status code.

After patch, the mail is sent.

Still remains a problem:

After patch: I can't save such an email as I get a warning
The email address you entered is invalid. Please enter another email address.
I guess the regex may be wrong

avatar infograf768
infograf768 - comment - 14 Dec 2021

Maybe

if (preg_match('/[^\x20-\x7e]/', $utfString))

avatar PhilETaylor
PhilETaylor - comment - 14 Dec 2021

this is the type of thing that is best tested with Unit Tests - can you provide a set of Unit tests as well?

avatar HLeithner
HLeithner - comment - 15 Dec 2021

the regex will always match because it doesn't except . right?

avatar HLeithner
HLeithner - comment - 15 Dec 2021

and it would be easier to test for xn--

avatar pmleconte
pmleconte - comment - 15 Dec 2021

and it would be easier to test for xn--

I was not sure about uniqueness of the prefix.

avatar pmleconte
pmleconte - comment - 16 Dec 2021

Updated code to ignore AlreadyPunycodeException instead of testing domain value.

avatar fontanil
fontanil - comment - 16 Dec 2021

The PR works fine for me: test email sent and well received, no more Punycode error.
Thanks!

avatar FrankReisenhofer
FrankReisenhofer - comment - 25 May 2022

@conseilgouz : Any idea when this PR will be merged. So the fix would be available for consumers :-)
Thanks for an update.

avatar conseilgouz
conseilgouz - comment - 25 May 2022

@conseilgouz : Any idea when this PR will be merged. So the fix would be available for consumers :-) Thanks for an update.

This PR has been marked "closed", and is not in 4.1.

No idea who did that, but, I think that as nobody tested it, it's normal PR life.....

avatar FrankReisenhofer
FrankReisenhofer - comment - 25 May 2022

@conseilgouz : Thanks for your quick reply.

At the moment I can confirm that the issue is still reproducible in 4.1.4

So how to proceed? What do you suggest?

Above I saw: [1]. So the PR was tested

[1]

fontanil commented on Dec 16, 2021
The PR works fine for me: test email sent and well received, no more Punycode error.
Thanks!

avatar conseilgouz
conseilgouz - comment - 26 May 2022

@conseilgouz : Thanks for your quick reply.

At the moment I can confirm that the issue is still reproducible in 4.1.4

So how to proceed? What do you suggest?

Above I saw: [1]. So the PR was tested

[1]

fontanil commented on Dec 16, 2021 The PR works fine for me: test email sent and well received, no more Punycode error. Thanks!

A PR has to be "human tested" twice, following the right procedure.
fontanil commented on Dec 16, 2021 just said it was ok, but did not respect the procedure, so no human test has be recorded for this PR => dead PR

To go RTC, it has to be reopened and tested.

avatar FrankReisenhofer
FrankReisenhofer - comment - 1 Jun 2022

@conseilgouz : Thanks for your update. Are you going to reopen the PR? If not: Who can do this?

avatar conseilgouz
conseilgouz - comment - 1 Jun 2022

I don't have the rights to do it. I just asked it in issue #36301 .
Let's hope this will reopen this PR.

avatar alikon alikon - change - 1 Jun 2022
Labels Added: ?
Removed: ?
avatar alikon alikon - reopen - 1 Jun 2022
avatar alikon
alikon - comment - 1 Jun 2022

pr opened as rquested #36301 (comment)

avatar conseilgouz
conseilgouz - comment - 1 Jun 2022

@alikon : what is missing in this PR to go RTC ?

avatar alikon
alikon - comment - 1 Jun 2022

2 human succesfull tests
image

avatar conseilgouz
conseilgouz - comment - 1 Jun 2022

@FrankReisenhofer @fontanil : please test this PR and send your result via https://issues.joomla.org/tracker/joomla-cms/36303

avatar conseilgouz
conseilgouz - comment - 1 Jun 2022

@alikon : thank you.

Next question : I have "This branch is out-of-date with the base branch" message and no way to fix this. Any idea ?

avatar FrankReisenhofer FrankReisenhofer - test_item - 1 Jun 2022 - Tested successfully
avatar FrankReisenhofer
FrankReisenhofer - comment - 1 Jun 2022

I have tested this item successfully on 5d16f6e

With the fix the reported issue is no longer occurring. My human manual tests are green


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36303.

avatar fontanil fontanil - test_item - 2 Jun 2022 - Tested successfully
avatar fontanil
fontanil - comment - 2 Jun 2022

I have tested this item successfully on 5d16f6e

Tested after manual changes in the file (Patch tester doesn't change the code) : no more error for me.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36303.

avatar joomla-cms-bot joomla-cms-bot - edited - 2 Jun 2022
avatar alikon
alikon - comment - 2 Jun 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36303.

avatar Quy Quy - change - 2 Jun 2022
Status Pending Ready to Commit
avatar bembelimen bembelimen - change - 5 Jun 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-06-05 19:05:17
Closed_By bembelimen
Labels Added: ?
avatar bembelimen bembelimen - close - 5 Jun 2022
avatar bembelimen bembelimen - merge - 5 Jun 2022
avatar bembelimen
bembelimen - comment - 5 Jun 2022

Thx

Add a Comment

Login with GitHub to post a comment