mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Fix idn decoding (#1175)
This commit is contained in:
parent
e5af98b04b
commit
1e287f486d
1 changed files with 2 additions and 1 deletions
|
|
@ -2428,6 +2428,7 @@ END;
|
||||||
{
|
{
|
||||||
include_once MAILSO_LIBRARY_ROOT_PATH.'Vendors/Net/IDNA2.php';
|
include_once MAILSO_LIBRARY_ROOT_PATH.'Vendors/Net/IDNA2.php';
|
||||||
$oIdn = new \Net_IDNA2();
|
$oIdn = new \Net_IDNA2();
|
||||||
|
$oIdn->setParams('utf8', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $oIdn;
|
return $oIdn;
|
||||||
|
|
@ -2441,7 +2442,7 @@ END;
|
||||||
*/
|
*/
|
||||||
public static function IdnToUtf8($sStr, $bLowerIfAscii = false)
|
public static function IdnToUtf8($sStr, $bLowerIfAscii = false)
|
||||||
{
|
{
|
||||||
if (0 < \strlen($sStr) && \preg_match('/(^|\.)xn--/i', $sStr))
|
if (0 < \strlen($sStr) && \preg_match('/(^|\.|@)xn--/i', $sStr))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue