summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-03-22 16:00:47 +0100
committerAndrey Andreev <narf@devilix.net>2018-03-22 16:00:47 +0100
commitc243df3af851fe90cd272f3958f7eb7bf76173b1 (patch)
tree83e8bda62fe6c5b40b7cd93cbc6c6c3a8214cc03 /system/libraries
parentf3e19ac4990e1e3fbc6964e97e7e09e506935d6e (diff)
parent3d2073e877cb1fddbea8fcec5bc5d38b545cdcfa (diff)
Merge branch '3.1-stable' into develop
Conflicts resolved: system/core/CodeIgniter.php system/core/Security.php system/database/DB_query_builder.php system/libraries/Email.php user_guide_src/source/changelog.rst user_guide_src/source/conf.py user_guide_src/source/installation/downloads.rst user_guide_src/source/installation/upgrading.rst
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Email.php6
-rw-r--r--system/libraries/Xmlrpc.php2
2 files changed, 6 insertions, 2 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 1847cc96f..beb2ffa17 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1824,7 +1824,11 @@ 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), 0, INTL_IDNA_VARIANT_UTS46);
+ list($account, $domain) = explode('@', $email, 2);
+ $domain = defined('INTL_IDNA_VARIANT_UTS46')
+ ? idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46)
+ : idn_to_ascii($domain);
+ $email = $account.'@'.$domain;
}
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/Xmlrpc.php b/system/libraries/Xmlrpc.php
index 1d33b7742..8cc1c83f5 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -1179,7 +1179,7 @@ class XML_RPC_Message extends CI_Xmlrpc
$data = implode("\r\n", $lines);
// Parse XML data
- if ( ! xml_parse($parser, $data, count($data)))
+ if ( ! xml_parse($parser, $data, TRUE))
{
$errstr = sprintf('XML error: %s at line %d',
xml_error_string(xml_get_error_code($parser)),