Skip to content

[4.0] AlreadyPunycodeException exception in email test#36303

Merged
bembelimen merged 10 commits intojoomla:4.1-devfrom
conseilgouz:4.0-dev
Jun 5, 2022
Merged

[4.0] AlreadyPunycodeException exception in email test#36303
bembelimen merged 10 commits intojoomla:4.1-devfrom
conseilgouz:4.0-dev

Conversation

@conseilgouz
Copy link
Copy Markdown
Contributor

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

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

fix #36301
@conseilgouz conseilgouz changed the title [4.0] Update PunycodeHelper.php [4.0] AlreadyPunycodeException exception in email test Dec 13, 2021
@infograf768
Copy link
Copy Markdown
Member

infograf768 commented Dec 14, 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

@infograf768
Copy link
Copy Markdown
Member

Maybe

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

@PhilETaylor

This comment was marked as abuse.

@HLeithner
Copy link
Copy Markdown
Member

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

@HLeithner
Copy link
Copy Markdown
Member

and it would be easier to test for xn--

@conseilgouz
Copy link
Copy Markdown
Contributor Author

and it would be easier to test for xn--

I was not sure about uniqueness of the prefix.

@conseilgouz
Copy link
Copy Markdown
Contributor Author

Updated code to ignore AlreadyPunycodeException instead of testing domain value.

@fontanil
Copy link
Copy Markdown

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

@chmst chmst changed the base branch from 4.0-dev to 4.1-dev January 31, 2022 17:31
@FrankReisenhofer
Copy link
Copy Markdown

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

@conseilgouz
Copy link
Copy Markdown
Contributor Author

@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.....

@FrankReisenhofer
Copy link
Copy Markdown

FrankReisenhofer commented May 25, 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!

@conseilgouz
Copy link
Copy Markdown
Contributor Author

@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.

@FrankReisenhofer
Copy link
Copy Markdown

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

@conseilgouz
Copy link
Copy Markdown
Contributor Author

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

@alikon alikon reopened this Jun 1, 2022
@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jun 1, 2022

pr opened as rquested #36301 (comment)

@conseilgouz
Copy link
Copy Markdown
Contributor Author

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

@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jun 1, 2022

2 human succesfull tests
image

@conseilgouz
Copy link
Copy Markdown
Contributor Author

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

@conseilgouz
Copy link
Copy Markdown
Contributor Author

@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 ?

@FrankReisenhofer
Copy link
Copy Markdown

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.

@fontanil
Copy link
Copy Markdown

fontanil commented Jun 2, 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.

@joomla-cms-bot joomla-cms-bot changed the title [4.0] AlreadyPunycodeException exception in email test [4.0] AlreadyPunycodeException exception in email test Jun 2, 2022
@alikon
Copy link
Copy Markdown
Contributor

alikon commented Jun 2, 2022

RTC


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

@Quy Quy added the RTC This Pull Request is Ready To Commit label Jun 2, 2022
@bembelimen bembelimen merged commit 2187874 into joomla:4.1-dev Jun 5, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 5, 2022
@bembelimen
Copy link
Copy Markdown
Contributor

Thx

@bembelimen bembelimen added this to the Joomla 4.1.5 milestone Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.