Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MailTO to cyrillic/punycode domains #4661

Closed
rcubetrac opened this issue Sep 10, 2014 · 5 comments
Closed

MailTO to cyrillic/punycode domains #4661

rcubetrac opened this issue Sep 10, 2014 · 5 comments

Comments

@rcubetrac
Copy link

Reported by cyberfunk on 10 Sep 2014 13:40 UTC as Trac ticket #1490067

Something went wrong with RCube 1.0.2, namely: it stopped supporting punycode and cyrillic charsets in MailTo:
Previously I have been successfully using RCube 0.8.6 for sending both cyrillic and punycode messages. Then, after updating it from 0.8.6 to 1.0.2, the "Invalid e-mail address" error started being triggered by email sending attempts.
Upon investigation a problem with the "check_email" function has been discovered inside the program/lib/Roundcube/rcube_utils.php file, in the "last domain part" statement (string #111).
The following changes have been made:

==============================================================================
--- roundcubemail-1.0.2.org/program/lib/Roundcube/rcube_utils.php   2014-07-20 16:17:58.000000000 +0400
+++ roundcubemail-1.0.2.new/program/lib/Roundcube/rcube_utils.php   2014-09-10 15:35:13.000000000 +0400
@@ -110,7 +110,12 @@

             // last domain part
             if (preg_match('/[$array_pop_tmp = array_pop($domain_array))) {
-                return false;
+               if (preg_match('/^xn--[A-Za-z0-9](^a-zA-Z]/',)+/', $array_pop_tmp)) {
+                    return true;
+               }
+               else {
+                   return false;
+               }
+       unset($array_pop_tmp);
             }

             $rcube = rcube::get_instance();
==============================================================================

Afer applying the above adjustment the RCube started working correctly.

Keywords: IDN, punycode, cyrillic domains, mailTo
Migrated-From: http://trac.roundcube.net/ticket/1490067

@rcubetrac
Copy link
Author

Comment by @alecpl on 10 Sep 2014 17:42 UTC

This check is only for the last domain part, e.g. com, org, uk. Do you have punnycode there? What is your domain?

@rcubetrac
Copy link
Author

Milestone changed by @alecpl on 10 Sep 2014 17:42 UTC

later => 1.0.3

@rcubetrac
Copy link
Author

Comment by cyberfunk on 11 Sep 2014 05:42 UTC

Error apears for any RU domain on IDN.
For example: xn--e1aaa0cbbbcacac.xn--p1ai

@rcubetrac
Copy link
Author

Comment by @alecpl on 13 Sep 2014 10:38 UTC

Fixed in 848e204.

@rcubetrac
Copy link
Author

Status changed by @alecpl on 13 Sep 2014 10:38 UTC

new => closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant