mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-21 20:44:25 +08:00
Simple black list plugin fix
This commit is contained in:
parent
7f16fa87a3
commit
e95a3c1f95
1 changed files with 4 additions and 4 deletions
|
@ -16,11 +16,11 @@ class BlackListPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
*/
|
||||
public function FilterLoginCredentials(&$sEmail, &$sLogin, &$sPassword)
|
||||
{
|
||||
if (\RainLoop\Plugins\Helper::ValidateWildcardValues($sEmail,
|
||||
$this->Config()->Get('plugin', 'black_list', '')))
|
||||
$sBlackList = \trim($this->Config()->Get('plugin', 'black_list', ''));
|
||||
if (0 < \strlen($sBlackList) && \RainLoop\Plugins\Helper::ValidateWildcardValues($sEmail, $sBlackList))
|
||||
{
|
||||
$sExceptions = \trim($this->Config()->Get('plugin', 'exceptions', ''));
|
||||
if (0 === strlen($sExceptions) || !\RainLoop\Plugins\Helper::ValidateWildcardValues($sEmail, $sExceptions))
|
||||
if (0 === \strlen($sExceptions) || !\RainLoop\Plugins\Helper::ValidateWildcardValues($sEmail, $sExceptions))
|
||||
{
|
||||
throw new \RainLoop\Exceptions\ClientException(
|
||||
$this->Config()->Get('plugin', 'auth_error', true) ?
|
||||
|
@ -46,7 +46,7 @@ class BlackListPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
\RainLoop\Plugins\Property::NewInstance('exceptions')->SetLabel('Exceptions')
|
||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::STRING_TEXT)
|
||||
->SetDescription('Exceptions for black list, space as delimiter, wildcard supported.')
|
||||
->SetDefaultValue('demo@domain1.com test-*@domain2.com admin@*')
|
||||
->SetDefaultValue('demo@domain1.com *@domain2.com admin@*')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue