From e95a3c1f9578d5d1b02e9e5faaca88904026e176 Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Tue, 10 Dec 2013 17:32:06 +0400 Subject: [PATCH] Simple black list plugin fix --- plugins/black-list/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/black-list/index.php b/plugins/black-list/index.php index fc351a7e3..db77846c9 100644 --- a/plugins/black-list/index.php +++ b/plugins/black-list/index.php @@ -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@*') ); } }