Improved handling of Internationalized Domain Names in punycode

This commit is contained in:
the-djmaze 2024-03-12 16:06:17 +01:00
parent fd54796710
commit 696a2bbd3c
45 changed files with 661 additions and 236 deletions

View file

@ -1,4 +1,4 @@
<?php
getEmailAddressDomain<?php
class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISuggestions
{
@ -93,12 +93,12 @@ class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISugges
return $aResult;
}
$sDomain = \MailSo\Base\Utils::GetDomainFromEmail($oAccount->Email());
$sDomain = \MailSo\Base\Utils::getEmailAddressDomain($oAccount->Email());
$sBaseDn = \strtr($this->sBaseDn, array(
'{domain}' => $sDomain,
'{domain:dc}' => 'dc='.\strtr($sDomain, array('.' => ',dc=')),
'{email}' => $oAccount->Email(),
'{email:user}' => \MailSo\Base\Utils::GetAccountNameFromEmail($oAccount->Email()),
'{email:user}' => \MailSo\Base\Utils::getEmailAddressLocalPart($oAccount->Email()),
'{email:domain}' => $sDomain,
'{login}' => $oAccount->IncLogin(),
'{imap:login}' => $oAccount->IncLogin(),

View file

@ -5,8 +5,8 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin
const
NAME = 'Contacts suggestions (LDAP)',
VERSION = '2.14',
RELEASE = '2024-03-10',
REQUIRED = '2.23.0',
RELEASE = '2024-03-12',
REQUIRED = '2.35.3',
CATEGORY = 'Contacts',
DESCRIPTION = 'Get contacts suggestions from LDAP.';