summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-11-09 16:29:42 +0100
committerAndrey Andreev <narf@devilix.net>2017-11-09 16:29:42 +0100
commit4fed06145e798fcff79bbe571a3ee3e262fa484a (patch)
tree37229e1445cdce4860fa8f4032f2075d2be93de4
parentf9133e2ea006a796fdaf39d5421d99f1a9a57c80 (diff)
parent4541bf930e715917622dc2d225bf5517f99db35a (diff)
Merge branch '3.1-stable' into develop
-rw-r--r--system/libraries/Email.php4
-rw-r--r--system/libraries/Form_validation.php2
-rw-r--r--user_guide_src/source/changelog.rst4
3 files changed, 5 insertions, 5 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 5943127bc..f115d9f40 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1016,7 +1016,7 @@ class CI_Email {
{
if (function_exists('idn_to_ascii') && $atpos = strpos($email, '@'))
{
- $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), INTL_IDNA_VARIANT_UTS46);
+ $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), 0, INTL_IDNA_VARIANT_UTS46);
}
return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
@@ -1823,7 +1823,7 @@ class CI_Email {
{
if (function_exists('idn_to_ascii') && $atpos = strpos($email, '@'))
{
- $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), INTL_IDNA_VARIANT_UTS46);
+ $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), 0, INTL_IDNA_VARIANT_UTS46);
}
return (filter_var($email, FILTER_VALIDATE_EMAIL) === $email && preg_match('#\A[a-z0-9._+-]+@[a-z0-9.-]{1,253}\z#i', $email));
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index ee9ea6850..da288ec76 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1237,7 +1237,7 @@ class CI_Form_validation {
{
if (function_exists('idn_to_ascii') && preg_match('#\A([^@]+)@(.+)\z#', $str, $matches))
{
- $str = $matches[1].'@'.idn_to_ascii($matches[2], INTL_IDNA_VARIANT_UTS46);
+ $str = $matches[1].'@'.idn_to_ascii($matches[2], 0, INTL_IDNA_VARIANT_UTS46);
}
return (bool) filter_var($str, FILTER_VALIDATE_EMAIL);
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index c4ffbf5d7..56e587e9b 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -126,8 +126,8 @@ Release Date: Not Released
- General Changes
- - Updated :doc:`Form Validation Library <libraries/form_validation>` rule ``valid_email`` to use ``INTL_IDNA_VARIANT_UCS46`` for non-ASCII domain names.
- - Updated :doc:`Email Library <libraries/email>` to use ``INTL_IDNA_VARIANT_UCS46`` for non-ASCII domain names.
+ - Updated :doc:`Form Validation Library <libraries/form_validation>` rule ``valid_email`` to use ``INTL_IDNA_VARIANT_UTS46`` for non-ASCII domain names.
+ - Updated :doc:`Email Library <libraries/email>` to use ``INTL_IDNA_VARIANT_UTS46`` for non-ASCII domain names.
- Deprecated usage of :doc:`CAPTCHA Helper <helpers/captcha_helper>` function :php:func:`create_captcha()` with parameters other than ``$data``.
Bug fixes for 3.1.7