mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
1.10.3.150
This commit is contained in:
parent
c3985da102
commit
fa6d7b3b86
5 changed files with 2734 additions and 2728 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "RainLoop",
|
"name": "RainLoop",
|
||||||
"title": "RainLoop Webmail",
|
"title": "RainLoop Webmail",
|
||||||
"version": "1.10.2",
|
"version": "1.10.3",
|
||||||
"release": "145",
|
"release": "150",
|
||||||
|
"ownCloudPackageVersion": "4.23",
|
||||||
"private": true,
|
"private": true,
|
||||||
"ownCloudPackageVersion": "4.22",
|
|
||||||
"description": "Simple, modern & fast web-based email client",
|
"description": "Simple, modern & fast web-based email client",
|
||||||
"homepage": "http://rainloop.net",
|
"homepage": "http://rainloop.net",
|
||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
|
|
|
||||||
|
|
@ -1,95 +1,95 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class ISPmailChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
class IspmailChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
public function Init()
|
public function Init()
|
||||||
{
|
{
|
||||||
$this->addHook('main.fabrica', 'MainFabrica');
|
$this->addHook('main.fabrica', 'MainFabrica');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function Supported()
|
public function Supported()
|
||||||
{
|
{
|
||||||
if (!extension_loaded('pdo') || !class_exists('PDO'))
|
if (!extension_loaded('pdo') || !class_exists('PDO'))
|
||||||
{
|
{
|
||||||
return 'The PHP exention PDO (mysql) must be installed to use this plugin';
|
return 'The PHP exention PDO (mysql) must be installed to use this plugin';
|
||||||
}
|
}
|
||||||
|
|
||||||
$aDrivers = \PDO::getAvailableDrivers();
|
$aDrivers = \PDO::getAvailableDrivers();
|
||||||
if (!is_array($aDrivers) || !in_array('mysql', $aDrivers))
|
if (!is_array($aDrivers) || !in_array('mysql', $aDrivers))
|
||||||
{
|
{
|
||||||
return 'The PHP exention PDO (mysql) must be installed to use this plugin';
|
return 'The PHP exention PDO (mysql) must be installed to use this plugin';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sName
|
* @param string $sName
|
||||||
* @param mixed $oProvider
|
* @param mixed $oProvider
|
||||||
*/
|
*/
|
||||||
public function MainFabrica($sName, &$oProvider)
|
public function MainFabrica($sName, &$oProvider)
|
||||||
{
|
{
|
||||||
switch ($sName)
|
switch ($sName)
|
||||||
{
|
{
|
||||||
case 'change-password':
|
case 'change-password':
|
||||||
|
|
||||||
include_once __DIR__.'/ChangePasswordISPmailDriver.php';
|
include_once __DIR__.'/ChangePasswordISPmailDriver.php';
|
||||||
|
|
||||||
$oProvider = new ChangePasswordISPmailDriver();
|
$oProvider = new ChangePasswordISPmailDriver();
|
||||||
|
|
||||||
$oProvider
|
$oProvider
|
||||||
->SetHost($this->Config()->Get('plugin', 'host', ''))
|
->SetHost($this->Config()->Get('plugin', 'host', ''))
|
||||||
->SetPort((int) $this->Config()->Get('plugin', 'port', 3306))
|
->SetPort((int) $this->Config()->Get('plugin', 'port', 3306))
|
||||||
->SetDatabase($this->Config()->Get('plugin', 'database', ''))
|
->SetDatabase($this->Config()->Get('plugin', 'database', ''))
|
||||||
->SetTable($this->Config()->Get('plugin', 'table', ''))
|
->SetTable($this->Config()->Get('plugin', 'table', ''))
|
||||||
->SetUserColumn($this->Config()->Get('plugin', 'usercol', ''))
|
->SetUserColumn($this->Config()->Get('plugin', 'usercol', ''))
|
||||||
->SetPasswordColumn($this->Config()->Get('plugin', 'passcol', ''))
|
->SetPasswordColumn($this->Config()->Get('plugin', 'passcol', ''))
|
||||||
->SetUser($this->Config()->Get('plugin', 'user', ''))
|
->SetUser($this->Config()->Get('plugin', 'user', ''))
|
||||||
->SetPassword($this->Config()->Get('plugin', 'password', ''))
|
->SetPassword($this->Config()->Get('plugin', 'password', ''))
|
||||||
->SetEncrypt($this->Config()->Get('plugin', 'encrypt', ''))
|
->SetEncrypt($this->Config()->Get('plugin', 'encrypt', ''))
|
||||||
->SetAllowedEmails(\strtolower(\trim($this->Config()->Get('plugin', 'allowed_emails', ''))))
|
->SetAllowedEmails(\strtolower(\trim($this->Config()->Get('plugin', 'allowed_emails', ''))))
|
||||||
->SetLogger($this->Manager()->Actions()->Logger())
|
->SetLogger($this->Manager()->Actions()->Logger())
|
||||||
;
|
;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function configMapping()
|
public function configMapping()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
\RainLoop\Plugins\Property::NewInstance('host')->SetLabel('MySQL Host')
|
\RainLoop\Plugins\Property::NewInstance('host')->SetLabel('MySQL Host')
|
||||||
->SetDefaultValue('127.0.0.1'),
|
->SetDefaultValue('127.0.0.1'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('port')->SetLabel('MySQL Port')
|
\RainLoop\Plugins\Property::NewInstance('port')->SetLabel('MySQL Port')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::INT)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::INT)
|
||||||
->SetDefaultValue(3306),
|
->SetDefaultValue(3306),
|
||||||
\RainLoop\Plugins\Property::NewInstance('database')->SetLabel('MySQL Database')
|
\RainLoop\Plugins\Property::NewInstance('database')->SetLabel('MySQL Database')
|
||||||
->SetDefaultValue('mailserver'),
|
->SetDefaultValue('mailserver'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('table')->SetLabel('MySQL table')
|
\RainLoop\Plugins\Property::NewInstance('table')->SetLabel('MySQL table')
|
||||||
->SetDefaultValue('virtual_users'),
|
->SetDefaultValue('virtual_users'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('usercol')->SetLabel('MySQL username column')
|
\RainLoop\Plugins\Property::NewInstance('usercol')->SetLabel('MySQL username column')
|
||||||
->SetDefaultValue('email'),
|
->SetDefaultValue('email'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('passcol')->SetLabel('MySQL password column')
|
\RainLoop\Plugins\Property::NewInstance('passcol')->SetLabel('MySQL password column')
|
||||||
->SetDefaultValue('password'),
|
->SetDefaultValue('password'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('user')->SetLabel('MySQL User')
|
\RainLoop\Plugins\Property::NewInstance('user')->SetLabel('MySQL User')
|
||||||
->SetDefaultValue('mailuser'),
|
->SetDefaultValue('mailuser'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('password')->SetLabel('MySQL Password')
|
\RainLoop\Plugins\Property::NewInstance('password')->SetLabel('MySQL Password')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::PASSWORD)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::PASSWORD)
|
||||||
->SetDefaultValue(''),
|
->SetDefaultValue(''),
|
||||||
\RainLoop\Plugins\Property::NewInstance('encrypt')->SetLabel('Encrypt')
|
\RainLoop\Plugins\Property::NewInstance('encrypt')->SetLabel('Encrypt')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::SELECTION)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::SELECTION)
|
||||||
->SetDefaultValue(array('PLAIN-MD5', 'SHA256-CRYPT'))
|
->SetDefaultValue(array('PLAIN-MD5', 'SHA256-CRYPT'))
|
||||||
->SetDescription('In what way do you want the passwords to be crypted ?'),
|
->SetDescription('In what way do you want the passwords to be crypted ?'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('allowed_emails')->SetLabel('Allowed emails')
|
\RainLoop\Plugins\Property::NewInstance('allowed_emails')->SetLabel('Allowed emails')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::STRING_TEXT)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::STRING_TEXT)
|
||||||
->SetDescription('Allowed emails, space as delimiter, wildcard supported. Example: user1@domain1.net user2@domain1.net *@domain2.net')
|
->SetDescription('Allowed emails, space as delimiter, wildcard supported. Example: user1@domain1.net user2@domain1.net *@domain2.net')
|
||||||
->SetDefaultValue('*')
|
->SetDefaultValue('*')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,95 +1,95 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class PostfixAdminChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
class PostfixadminChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
public function Init()
|
public function Init()
|
||||||
{
|
{
|
||||||
$this->addHook('main.fabrica', 'MainFabrica');
|
$this->addHook('main.fabrica', 'MainFabrica');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function Supported()
|
public function Supported()
|
||||||
{
|
{
|
||||||
if (!extension_loaded('pdo') || !class_exists('PDO'))
|
if (!extension_loaded('pdo') || !class_exists('PDO'))
|
||||||
{
|
{
|
||||||
return 'The PHP exention PDO (mysql) must be installed to use this plugin';
|
return 'The PHP exention PDO (mysql) must be installed to use this plugin';
|
||||||
}
|
}
|
||||||
|
|
||||||
$aDrivers = \PDO::getAvailableDrivers();
|
$aDrivers = \PDO::getAvailableDrivers();
|
||||||
if (!is_array($aDrivers) || !in_array('mysql', $aDrivers))
|
if (!is_array($aDrivers) || !in_array('mysql', $aDrivers))
|
||||||
{
|
{
|
||||||
return 'The PHP exention PDO (mysql) must be installed to use this plugin';
|
return 'The PHP exention PDO (mysql) must be installed to use this plugin';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sName
|
* @param string $sName
|
||||||
* @param mixed $oProvider
|
* @param mixed $oProvider
|
||||||
*/
|
*/
|
||||||
public function MainFabrica($sName, &$oProvider)
|
public function MainFabrica($sName, &$oProvider)
|
||||||
{
|
{
|
||||||
switch ($sName)
|
switch ($sName)
|
||||||
{
|
{
|
||||||
case 'change-password':
|
case 'change-password':
|
||||||
|
|
||||||
include_once __DIR__.'/ChangePasswordPostfixAdminDriver.php';
|
include_once __DIR__.'/ChangePasswordPostfixAdminDriver.php';
|
||||||
|
|
||||||
$oProvider = new ChangePasswordPostfixAdminDriver();
|
$oProvider = new ChangePasswordPostfixAdminDriver();
|
||||||
|
|
||||||
$oProvider
|
$oProvider
|
||||||
->SetHost($this->Config()->Get('plugin', 'host', ''))
|
->SetHost($this->Config()->Get('plugin', 'host', ''))
|
||||||
->SetPort((int) $this->Config()->Get('plugin', 'port', 3306))
|
->SetPort((int) $this->Config()->Get('plugin', 'port', 3306))
|
||||||
->SetDatabase($this->Config()->Get('plugin', 'database', ''))
|
->SetDatabase($this->Config()->Get('plugin', 'database', ''))
|
||||||
->SetTable($this->Config()->Get('plugin', 'table', ''))
|
->SetTable($this->Config()->Get('plugin', 'table', ''))
|
||||||
->SetUserColumn($this->Config()->Get('plugin', 'usercol', ''))
|
->SetUserColumn($this->Config()->Get('plugin', 'usercol', ''))
|
||||||
->SetPasswordColumn($this->Config()->Get('plugin', 'passcol', ''))
|
->SetPasswordColumn($this->Config()->Get('plugin', 'passcol', ''))
|
||||||
->SetUser($this->Config()->Get('plugin', 'user', ''))
|
->SetUser($this->Config()->Get('plugin', 'user', ''))
|
||||||
->SetPassword($this->Config()->Get('plugin', 'password', ''))
|
->SetPassword($this->Config()->Get('plugin', 'password', ''))
|
||||||
->SetEncrypt($this->Config()->Get('plugin', 'encrypt', ''))
|
->SetEncrypt($this->Config()->Get('plugin', 'encrypt', ''))
|
||||||
->SetAllowedEmails(\strtolower(\trim($this->Config()->Get('plugin', 'allowed_emails', ''))))
|
->SetAllowedEmails(\strtolower(\trim($this->Config()->Get('plugin', 'allowed_emails', ''))))
|
||||||
->SetLogger($this->Manager()->Actions()->Logger())
|
->SetLogger($this->Manager()->Actions()->Logger())
|
||||||
;
|
;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function configMapping()
|
public function configMapping()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
\RainLoop\Plugins\Property::NewInstance('host')->SetLabel('MySQL Host')
|
\RainLoop\Plugins\Property::NewInstance('host')->SetLabel('MySQL Host')
|
||||||
->SetDefaultValue('127.0.0.1'),
|
->SetDefaultValue('127.0.0.1'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('port')->SetLabel('MySQL Port')
|
\RainLoop\Plugins\Property::NewInstance('port')->SetLabel('MySQL Port')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::INT)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::INT)
|
||||||
->SetDefaultValue(3306),
|
->SetDefaultValue(3306),
|
||||||
\RainLoop\Plugins\Property::NewInstance('database')->SetLabel('MySQL Database')
|
\RainLoop\Plugins\Property::NewInstance('database')->SetLabel('MySQL Database')
|
||||||
->SetDefaultValue('postfixadmin'),
|
->SetDefaultValue('postfixadmin'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('table')->SetLabel('MySQL table')
|
\RainLoop\Plugins\Property::NewInstance('table')->SetLabel('MySQL table')
|
||||||
->SetDefaultValue('mailbox'),
|
->SetDefaultValue('mailbox'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('usercol')->SetLabel('MySQL username column')
|
\RainLoop\Plugins\Property::NewInstance('usercol')->SetLabel('MySQL username column')
|
||||||
->SetDefaultValue('username'),
|
->SetDefaultValue('username'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('passcol')->SetLabel('MySQL password column')
|
\RainLoop\Plugins\Property::NewInstance('passcol')->SetLabel('MySQL password column')
|
||||||
->SetDefaultValue('password'),
|
->SetDefaultValue('password'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('user')->SetLabel('MySQL User')
|
\RainLoop\Plugins\Property::NewInstance('user')->SetLabel('MySQL User')
|
||||||
->SetDefaultValue('postfixadmin'),
|
->SetDefaultValue('postfixadmin'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('password')->SetLabel('MySQL Password')
|
\RainLoop\Plugins\Property::NewInstance('password')->SetLabel('MySQL Password')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::PASSWORD)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::PASSWORD)
|
||||||
->SetDefaultValue(''),
|
->SetDefaultValue(''),
|
||||||
\RainLoop\Plugins\Property::NewInstance('encrypt')->SetLabel('Encrypt')
|
\RainLoop\Plugins\Property::NewInstance('encrypt')->SetLabel('Encrypt')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::SELECTION)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::SELECTION)
|
||||||
->SetDefaultValue(array('md5crypt', 'md5', 'system', 'cleartext', 'mysql_encrypt', 'SHA256-CRYPT', 'SHA512-CRYPT'))
|
->SetDefaultValue(array('md5crypt', 'md5', 'system', 'cleartext', 'mysql_encrypt', 'SHA256-CRYPT', 'SHA512-CRYPT'))
|
||||||
->SetDescription('In what way do you want the passwords to be crypted ?'),
|
->SetDescription('In what way do you want the passwords to be crypted ?'),
|
||||||
\RainLoop\Plugins\Property::NewInstance('allowed_emails')->SetLabel('Allowed emails')
|
\RainLoop\Plugins\Property::NewInstance('allowed_emails')->SetLabel('Allowed emails')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::STRING_TEXT)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::STRING_TEXT)
|
||||||
->SetDescription('Allowed emails, space as delimiter, wildcard supported. Example: user1@domain1.net user2@domain1.net *@domain2.net')
|
->SetDescription('Allowed emails, space as delimiter, wildcard supported. Example: user1@domain1.net user2@domain1.net *@domain2.net')
|
||||||
->SetDefaultValue('*')
|
->SetDefaultValue('*')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1783,7 +1783,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
||||||
$aResult['AllowDropboxSocial'] = (bool) $oConfig->Get('social', 'dropbox_enable', false);
|
$aResult['AllowDropboxSocial'] = (bool) $oConfig->Get('social', 'dropbox_enable', false);
|
||||||
$aResult['DropboxApiKey'] = (string) $oConfig->Get('social', 'dropbox_api_key', '');
|
$aResult['DropboxApiKey'] = (string) $oConfig->Get('social', 'dropbox_api_key', '');
|
||||||
|
|
||||||
$aResult['SubscriptionEnabled'] = (bool) \MailSo\Base\Utils::ValidateDomain($aResult['AdminDomain']);
|
$aResult['SubscriptionEnabled'] = (bool) \MailSo\Base\Utils::ValidateDomain($aResult['AdminDomain'], true);
|
||||||
// || \MailSo\Base\Utils::ValidateIP($aResult['AdminDomain']);
|
// || \MailSo\Base\Utils::ValidateIP($aResult['AdminDomain']);
|
||||||
|
|
||||||
$aResult['WeakPassword'] = (bool) $oConfig->ValidatePassword('12345');
|
$aResult['WeakPassword'] = (bool) $oConfig->ValidatePassword('12345');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue