Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec1c37aa06 | ||
|
|
67351ec3c2 | ||
|
|
f1887aaaf2 | ||
|
|
afd2d7b5e9 | ||
|
|
c967e585b5 | ||
|
|
73e364d4ba | ||
|
|
eb49331b21 | ||
|
|
0a1a3e023f | ||
|
|
bef5cedcd0 | ||
|
|
f8e2bc7bff | ||
|
|
09038ac7aa | ||
|
|
4c507232c7 | ||
|
|
86939a64da | ||
|
|
926ce427fc | ||
|
|
53401eebfb | ||
|
|
bef580929e | ||
|
|
c7b7c67ff4 | ||
|
|
ed42d4e3df | ||
|
|
69a2ebce36 | ||
|
|
15f08739fa | ||
|
|
571690c8c5 | ||
|
|
b2005d7f29 | ||
|
|
4354598c64 | ||
|
|
05d4bdc499 | ||
|
|
25c6a37df2 | ||
|
|
41a470fe36 | ||
|
|
8a4aa2a721 | ||
|
|
1d903770fc | ||
|
|
934be5a238 | ||
|
|
5608f0407f | ||
|
|
ce9d8dad7f | ||
|
|
d6fe263e68 |
40
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
40
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**As a rule of thumb: before reporting an issue**
|
||||
* see if it hasn't been [reported](https://github.com/Froxlor/froxlor/issues) (and possibly already been [fixed](https://github.com/Froxlor/froxlor/issues?utf8=✓&q=is:issue%20is:closed)) first
|
||||
* try with the git master
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**System information**
|
||||
* Froxlor version: $version/$gitSHA1
|
||||
* Web server: apache2/nginx/lighttpd
|
||||
* DNS server: Bind/PowerDNS (standalone)/PowerDNS (Bind-backend)
|
||||
* POP/IMAP server: Courier/Dovecot
|
||||
* SMTP server: postfix/exim
|
||||
* FTP server: proftpd/pureftpd
|
||||
* OS/Version: ...
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Logfiles**
|
||||
If applicable, add log-entries to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Froxlor-CI
|
||||
name: Froxlor-CI-MariaDB
|
||||
on: ['push', 'pull_request', 'create']
|
||||
|
||||
jobs:
|
||||
@@ -8,8 +8,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['7.3', '7.4', '8.0']
|
||||
mariadb-version: [10.5, 10.4, 10.3]
|
||||
php-versions: ['7.4', '8.0']
|
||||
mariadb-version: [10.5, 10.4]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
57
.github/workflows/build-mysql.yml
vendored
Normal file
57
.github/workflows/build-mysql.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Froxlor-CI-MySQL
|
||||
on: ['push', 'pull_request', 'create']
|
||||
|
||||
jobs:
|
||||
froxlor:
|
||||
name: Froxlor (PHP ${{ matrix.php-versions }}, MySQL ${{ matrix.mysql-version }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['7.4', '8.0']
|
||||
mysql-version: [8.0, 5.7]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP, with composer and extensions
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: composer:v2
|
||||
extensions: mbstring, xml, ctype, pdo_mysql, mysql, curl, json, zip, session, filter, posix, openssl, fileinfo, bcmath
|
||||
|
||||
- name: Install tools
|
||||
run: sudo apt-get install -y ant
|
||||
|
||||
- name: Adjust firewall
|
||||
run: |
|
||||
sudo ufw allow out 3306/tcp
|
||||
sudo ufw allow in 3306/tcp
|
||||
|
||||
- name: Setup MySQL
|
||||
uses: samin/mysql-action@v1.3
|
||||
with:
|
||||
mysql version: ${{ matrix.mysql-version }}
|
||||
mysql database: 'froxlor010'
|
||||
mysql root password: 'fr0xl0r.TravisCI'
|
||||
|
||||
- name: Wait for database
|
||||
run: sleep 15
|
||||
|
||||
- name: Setup database (8.0)
|
||||
if: matrix.mysql-version == '8.0'
|
||||
run: |
|
||||
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "CREATE USER 'froxlor010'@'%' IDENTIFIED WITH mysql_native_password BY 'fr0xl0r.TravisCI';"
|
||||
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "GRANT ALL ON froxlor010.* TO 'froxlor010'@'%';"
|
||||
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI froxlor010 < install/froxlor.sql
|
||||
|
||||
- name: Setup database (5.7)
|
||||
if: matrix.mysql-version == '5.7'
|
||||
run: |
|
||||
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "CREATE USER 'froxlor010'@'%' IDENTIFIED BY 'fr0xl0r.TravisCI';"
|
||||
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "GRANT ALL ON froxlor010.* TO 'froxlor010'@'%';"
|
||||
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI froxlor010 < install/froxlor.sql
|
||||
|
||||
- name: Run testing
|
||||
run: ant quick-build
|
||||
@@ -1,4 +1,5 @@
|
||||
[](https://github.com/Froxlor/Froxlor/actions/workflows/build.yml)
|
||||
[](https://github.com/Froxlor/Froxlor/actions/workflows/build-mariadb.yml)
|
||||
[](https://github.com/Froxlor/Froxlor/actions/workflows/build-mysql.yml)
|
||||
[](https://gitter.im/Froxlor/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
# Froxlor
|
||||
|
||||
@@ -77,14 +77,6 @@ return array(
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'panel_no_robots' => array(
|
||||
'label' => $lng['serversettings']['no_robots'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'no_robots',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'panel_paging' => array(
|
||||
'label' => $lng['serversettings']['paging'],
|
||||
'settinggroup' => 'panel',
|
||||
@@ -296,6 +288,22 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'panel_logo_overridetheme' => array(
|
||||
'label' => $lng['serversettings']['logo_overridetheme'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'logo_overridetheme',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'panel_logo_overridecustom' => array(
|
||||
'label' => $lng['serversettings']['logo_overridecustom'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'logo_overridecustom',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'panel_logo_image_header' => array(
|
||||
'label' => $lng['serversettings']['logo_image_header'],
|
||||
'settinggroup' => 'panel',
|
||||
|
||||
@@ -205,9 +205,21 @@ return array(
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/backup',
|
||||
'save_method' => 'storeSettingField'
|
||||
)
|
||||
),
|
||||
'system_createstdsubdom_default' => array(
|
||||
'label' => $lng['serversettings']['createstdsubdom_default'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'createstdsubdom_default',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(
|
||||
'0' => $lng['panel']['no'],
|
||||
'1' => $lng['panel']['yes']
|
||||
),
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -168,6 +168,8 @@ return array(
|
||||
'option_options' => array(
|
||||
'letsencrypt_test' => 'Let\'s Encrypt (Test / Staging)',
|
||||
'letsencrypt' => 'Let\'s Encrypt (Live)',
|
||||
'buypass_test' => 'Buypass (Test / Staging)',
|
||||
'buypass' => 'Buypass (Live)',
|
||||
'zerossl' => 'ZeroSSL (Live)'
|
||||
),
|
||||
'save_method' => 'storeSettingField'
|
||||
|
||||
@@ -99,6 +99,19 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_powerdns_mode' => array(
|
||||
'label' => $lng['serversettings']['powerdns_mode'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'powerdns_mode',
|
||||
'type' => 'option',
|
||||
'default' => 'Native',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(
|
||||
'Native' => 'Native',
|
||||
'Master' => 'Master'
|
||||
),
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_dns_createmailentry' => array(
|
||||
'label' => $lng['serversettings']['mail_also_with_mxservers'],
|
||||
'settinggroup' => 'system',
|
||||
|
||||
@@ -82,7 +82,20 @@ return array(
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField'
|
||||
)
|
||||
),
|
||||
'system_froxlorusergroup' => array(
|
||||
'label' => $lng['serversettings']['froxlorusergroup'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'froxlorusergroup',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'plausibility_check_method' => array(
|
||||
'\\Froxlor\\Validate\\Check',
|
||||
'checkLocalGroup'
|
||||
),
|
||||
'visible' => \Froxlor\Settings::Get('system.nssextrausers')
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -87,7 +87,7 @@ if ($page == 'showinfo') {
|
||||
$hits = $cache['num_hits'] . @sprintf(" (%.1f%%)", $cache['num_hits'] * 100 / ($cache['num_hits'] + $cache['num_misses']));
|
||||
$misses = $cache['num_misses'] . @sprintf(" (%.1f%%)", $cache['num_misses'] * 100 / ($cache['num_hits'] + $cache['num_misses']));
|
||||
|
||||
// Fragementation: (freeseg - 1) / total_seg
|
||||
// Fragmentation: (freeseg - 1) / total_seg
|
||||
$nseg = $freeseg = $fragsize = $freetotal = 0;
|
||||
for ($i = 0; $i < $mem['num_seg']; $i ++) {
|
||||
$ptr = 0;
|
||||
|
||||
@@ -428,7 +428,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
$customer = Database::pexecute_first($customer_stmt, array(
|
||||
'customerid' => $result['customerid']
|
||||
));
|
||||
$result['customername'] = \Froxlor\User::getCorrectFullUserDetails($customer) . ' (' . $customer['loginname'] . ')';
|
||||
$result['customername'] = \Froxlor\User::getCorrectFullUserDetails($customer);
|
||||
}
|
||||
|
||||
if ($userinfo['customers_see_all'] == '1') {
|
||||
@@ -594,6 +594,10 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
}
|
||||
|
||||
$result = \Froxlor\PhpHelper::htmlentitiesArray($result);
|
||||
if (Settings::Get('panel.allow_domain_change_customer') != '1') {
|
||||
$result['customername'] .= ' (<a href="' . $linker->getLink(array('section' => 'customers', 'page' => 'customers',
|
||||
'action' => 'su', 'id' => $customer['customerid'])) . '" rel="external">' . $customer['loginname'] . '</a>)';
|
||||
}
|
||||
|
||||
$domain_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/domains/formfield.domains_edit.php';
|
||||
$domain_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($domain_edit_data);
|
||||
|
||||
@@ -32,10 +32,10 @@ if ($page == 'message') {
|
||||
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'viewed panel_message');
|
||||
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
if ($_POST['receipient'] == 0 && $userinfo['customers_see_all'] == '1') {
|
||||
if ($_POST['recipient'] == 0 && $userinfo['customers_see_all'] == '1') {
|
||||
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'sending messages to admins');
|
||||
$result = Database::query('SELECT `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`");
|
||||
} elseif ($_POST['receipient'] == 1) {
|
||||
} elseif ($_POST['recipient'] == 1) {
|
||||
if ($userinfo['customers_see_all'] == '1') {
|
||||
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'sending messages to ALL customers');
|
||||
$result = Database::query('SELECT `firstname`, `name`, `company`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`");
|
||||
@@ -49,7 +49,7 @@ if ($page == 'message') {
|
||||
));
|
||||
}
|
||||
} else {
|
||||
\Froxlor\UI\Response::standard_error('noreceipientsgiven');
|
||||
\Froxlor\UI\Response::standard_error('norecipientsgiven');
|
||||
}
|
||||
|
||||
$subject = $_POST['subject'];
|
||||
@@ -105,7 +105,7 @@ if ($page == 'message') {
|
||||
$sentitems = isset($_GET['sentitems']) ? (int) $_GET['sentitems'] : 0;
|
||||
|
||||
if ($sentitems == 0) {
|
||||
$successmessage = $lng['message']['noreceipients'];
|
||||
$successmessage = $lng['message']['norecipients'];
|
||||
} else {
|
||||
$successmessage = str_replace('%s', $sentitems, $lng['message']['success']);
|
||||
}
|
||||
@@ -116,12 +116,12 @@ if ($page == 'message') {
|
||||
}
|
||||
|
||||
$action = '';
|
||||
$receipients = '';
|
||||
$recipients = '';
|
||||
|
||||
if ($userinfo['customers_see_all'] == '1') {
|
||||
$receipients .= \Froxlor\UI\HTML::makeoption($lng['panel']['reseller'], 0);
|
||||
$recipients .= \Froxlor\UI\HTML::makeoption($lng['panel']['reseller'], 0);
|
||||
}
|
||||
|
||||
$receipients .= \Froxlor\UI\HTML::makeoption($lng['panel']['customer'], 1);
|
||||
$recipients .= \Froxlor\UI\HTML::makeoption($lng['panel']['customer'], 1);
|
||||
eval("echo \"" . \Froxlor\UI\Template::getTemplate('message/message') . "\";");
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ require './lib/init.php';
|
||||
|
||||
if ($action == 'reset' && function_exists('opcache_reset') && $userinfo['change_serversettings'] == '1') {
|
||||
opcache_reset();
|
||||
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "reseted OPcache");
|
||||
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "reset OPcache");
|
||||
header('Location: ' . $linker->getLink(array(
|
||||
'section' => 'opcacheinfo',
|
||||
'page' => 'showinfo'
|
||||
|
||||
@@ -127,7 +127,7 @@ if ($action == 'delete') {
|
||||
|
||||
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed api::api_keys");
|
||||
|
||||
// select all my (accessable) certificates
|
||||
// select all my (accessible) certificates
|
||||
$keys_stmt_query = "SELECT ak.*, c.loginname, a.loginname as adminname
|
||||
FROM `" . TABLE_API_KEYS . "` ak
|
||||
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` c ON `c`.`customerid` = `ak`.`customerid`
|
||||
|
||||
@@ -611,6 +611,7 @@ opcache.interned_strings_buffer'),
|
||||
('system', 'documentroot_use_default_value', '0'),
|
||||
('system', 'passwordcryptfunc', '3'),
|
||||
('system', 'axfrservers', ''),
|
||||
('system', 'powerdns_mode', 'Native'),
|
||||
('system', 'customer_ssl_path', '/etc/ssl/froxlor-custom/'),
|
||||
('system', 'allow_error_report_admin', '1'),
|
||||
('system', 'allow_error_report_customer', '0'),
|
||||
@@ -678,6 +679,9 @@ opcache.interned_strings_buffer'),
|
||||
('system', 'include_default_vhostconf', '0'),
|
||||
('system', 'soaemail', ''),
|
||||
('system', 'domaindefaultalias', '0'),
|
||||
('system', 'createstdsubdom_default', '1'),
|
||||
('system', 'froxlorusergroup', ''),
|
||||
('system', 'froxlorusergroup_gid', ''),
|
||||
('api', 'enabled', '0'),
|
||||
('2fa', 'enabled', '1'),
|
||||
('panel', 'decimal_places', '4'),
|
||||
@@ -690,7 +694,6 @@ opcache.interned_strings_buffer'),
|
||||
('panel', 'paging', '20'),
|
||||
('panel', 'natsorting', '1'),
|
||||
('panel', 'sendalternativemail', '0'),
|
||||
('panel', 'no_robots', '1'),
|
||||
('panel', 'allow_domain_change_admin', '0'),
|
||||
('panel', 'allow_domain_change_customer', '0'),
|
||||
('panel', 'frontend', 'froxlor'),
|
||||
@@ -717,8 +720,10 @@ opcache.interned_strings_buffer'),
|
||||
('panel', 'privacy_url', ''),
|
||||
('panel', 'logo_image_header', ''),
|
||||
('panel', 'logo_image_login', ''),
|
||||
('panel', 'version', '0.10.27'),
|
||||
('panel', 'db_version', '202107070');
|
||||
('panel', 'logo_overridetheme', '0'),
|
||||
('panel', 'logo_overridecustom', '0'),
|
||||
('panel', 'version', '0.10.28'),
|
||||
('panel', 'db_version', '202108180');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
||||
@@ -123,7 +123,7 @@ class FroxlorInstall
|
||||
if ((isset($_POST['installstep']) && $_POST['installstep'] == '1') || (isset($_GET['check']) && $_GET['check'] == '1')) {
|
||||
$pagetitle = $this->_lng['install']['title'];
|
||||
if ($this->_checkPostData()) {
|
||||
// ceck data and create userdata etc.etc.etc.
|
||||
// check data and create userdata etc.etc.etc.
|
||||
$result = $this->_doInstall();
|
||||
} elseif (isset($_GET['check']) && $_GET['check'] == '1') {
|
||||
// gather data
|
||||
@@ -687,7 +687,7 @@ class FroxlorInstall
|
||||
if (version_compare($db_root->getAttribute(\PDO::ATTR_SERVER_VERSION), '8.0.11', '>=')) {
|
||||
// create user
|
||||
$stmt = $db_root->prepare("
|
||||
CREATE USER '" . $username . "'@'" . $access_host . "' IDENTIFIED BY :password
|
||||
CREATE USER '" . $username . "'@'" . $access_host . "' IDENTIFIED WITH mysql_native_password BY :password
|
||||
");
|
||||
$stmt->execute(array(
|
||||
"password" => $password
|
||||
@@ -739,7 +739,7 @@ class FroxlorInstall
|
||||
}
|
||||
|
||||
if ($tables_exist) {
|
||||
// tell whats going on
|
||||
// tell what's going on
|
||||
$content .= $this->_status_message('begin', $this->_lng['install']['backup_old_db']);
|
||||
|
||||
// create temporary backup-filename
|
||||
@@ -1310,10 +1310,12 @@ class FroxlorInstall
|
||||
// from form
|
||||
if (! empty($_POST['serverip'])) {
|
||||
$this->_data['serverip'] = $_POST['serverip'];
|
||||
$this->_data['serverip'] = inet_ntop(inet_pton($this->_data['serverip']));
|
||||
return;
|
||||
// from $_SERVER
|
||||
} elseif (! empty($_SERVER['SERVER_ADDR'])) {
|
||||
$this->_data['serverip'] = $_SERVER['SERVER_ADDR'];
|
||||
$this->_data['serverip'] = inet_ntop(inet_pton($this->_data['serverip']));
|
||||
return;
|
||||
}
|
||||
// empty
|
||||
|
||||
@@ -23,7 +23,7 @@ $lng['requirements']['notfound'] = 'not found';
|
||||
$lng['requirements']['notinstalled'] = 'not installed';
|
||||
$lng['requirements']['activated'] = 'enabled';
|
||||
$lng['requirements']['phpversion'] = 'PHP version >= 7.0';
|
||||
$lng['requirements']['newerphpprefered'] = 'Good, but php-7.1 is prefered.';
|
||||
$lng['requirements']['newerphpprefered'] = 'Good, but php-7.1 is preferred.';
|
||||
$lng['requirements']['phppdo'] = 'PHP PDO extension and PDO-MySQL driver...';
|
||||
$lng['requirements']['phpsession'] = 'PHP session-extension...';
|
||||
$lng['requirements']['phpctype'] = 'PHP ctype-extension...';
|
||||
@@ -39,7 +39,7 @@ $lng['requirements']['phpjson'] = 'PHP json-extension...';
|
||||
$lng['requirements']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
|
||||
$lng['requirements']['zipdescription'] = 'The auto-update feature requires the zip extension.';
|
||||
$lng['requirements']['openbasedir'] = 'open_basedir...';
|
||||
$lng['requirements']['openbasedirenabled'] = 'Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor in the coresponding php.ini';
|
||||
$lng['requirements']['openbasedirenabled'] = 'Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor in the corresponding php.ini';
|
||||
$lng['requirements']['mysqldump'] = 'MySQL dump tool';
|
||||
$lng['requirements']['mysqldumpmissing'] = 'Automatic backup of possible existing database is not possible. Please install mysql-client tools';
|
||||
$lng['requirements']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Try to fix them and retry.';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\Validate\Validate;
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
@@ -867,3 +868,61 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.10.26')) {
|
||||
showUpdateStep("Updating from 0.10.26 to 0.10.27", false);
|
||||
\Froxlor\Froxlor::updateToVersion('0.10.27');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202107070')) {
|
||||
showUpdateStep("Adding settings to overwrite theme- or custom theme-logo with the new logo settings", true);
|
||||
Settings::AddNew("panel.logo_overridetheme", '0');
|
||||
Settings::AddNew("panel.logo_overridecustom", '0');
|
||||
lastStepStatus(0);
|
||||
\Froxlor\Froxlor::updateToDbVersion('202107200');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202107200')) {
|
||||
showUpdateStep("Adding settings to define default value of 'create std-subdomain' when creating a customer", true);
|
||||
Settings::AddNew("system.createstdsubdom_default", '1');
|
||||
lastStepStatus(0);
|
||||
\Froxlor\Froxlor::updateToDbVersion('202107210');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202107210')) {
|
||||
showUpdateStep("Normalizing ipv6 for correct comparison", true);
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "`"
|
||||
);
|
||||
Database::pexecute($result_stmt);
|
||||
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "` SET `ip` = :ip WHERE `id` = :id");
|
||||
while ($iprow = $result_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||
if (Validate::is_ipv6($iprow['ip'])) {
|
||||
$ip = inet_ntop(inet_pton($iprow['ip']));
|
||||
Database::pexecute($upd_stmt, [
|
||||
'ip' => $ip,
|
||||
'id' => $iprow['id']
|
||||
]);
|
||||
}
|
||||
}
|
||||
lastStepStatus(0);
|
||||
\Froxlor\Froxlor::updateToDbVersion('202107260');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202107260')) {
|
||||
showUpdateStep("Removing setting for search-engine allow yes/no", true);
|
||||
Database::query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'panel' AND `varname` = 'no_robots'");
|
||||
lastStepStatus(0);
|
||||
showUpdateStep("Adding setting to have all froxlor customers in a local group", true);
|
||||
Settings::AddNew("system.froxlorusergroup", '');
|
||||
Settings::AddNew("system.froxlorusergroup_gid", '');
|
||||
lastStepStatus(0);
|
||||
\Froxlor\Froxlor::updateToDbVersion('202107300');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202107300')) {
|
||||
showUpdateStep("Adds the possibility to select the PowerDNS Operation Mode", true);
|
||||
Settings::AddNew("system.powerdns_mode", 'Native');
|
||||
lastStepStatus(0);
|
||||
\Froxlor\Froxlor::updateToDbVersion('202108180');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.27')) {
|
||||
showUpdateStep("Updating from 0.10.27 to 0.10.28", false);
|
||||
\Froxlor\Froxlor::updateToVersion('0.10.28');
|
||||
}
|
||||
|
||||
@@ -2505,7 +2505,7 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.9.30')) {
|
||||
showUpdateStep("Updating from 0.9.30 to 0.9.31-dev1", true);
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Removing unsused tables");
|
||||
showUpdateStep("Removing unused tables");
|
||||
Database::query("DROP TABLE IF EXISTS `ipsandports_docrootsettings`;");
|
||||
Database::query("DROP TABLE IF EXISTS `domain_docrootsettings`;");
|
||||
lastStepStatus(0);
|
||||
@@ -2856,7 +2856,7 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.9.32-rc1')) {
|
||||
Settings::AddNew("system.croncmdline", $croncmdline);
|
||||
// add task to generate cron.d-file
|
||||
\Froxlor\System\Cronjob::inserttask('99');
|
||||
// silenty add the auto-update setting - we do not want everybody to know and use this
|
||||
// silently add the auto-update setting - we do not want everybody to know and use this
|
||||
// as it is a very dangerous setting
|
||||
Settings::AddNew("system.cron_allowautoupdate", 0);
|
||||
lastStepStatus(0);
|
||||
@@ -3872,7 +3872,7 @@ opcache.interned_strings_buffer');
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('201801110')) {
|
||||
|
||||
showUpdateStep("Adding php-fpm php PATH setting for envrironment");
|
||||
showUpdateStep("Adding php-fpm php PATH setting for environment");
|
||||
Settings::AddNew("phpfpm.envpath", '/usr/local/bin:/usr/bin:/bin');
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* Function getPreConfig
|
||||
*
|
||||
* outputs various content before the update process
|
||||
* can be continued (askes for agreement whatever is being asked)
|
||||
* can be continued (asks for agreement whatever is being asked)
|
||||
*
|
||||
* @param string $current_version
|
||||
* @param int $current_db_version
|
||||
|
||||
@@ -414,7 +414,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
|
||||
|
||||
if (Settings::Get('system.webserver') == 'apache2') {
|
||||
$has_preconfig = true;
|
||||
$description = 'Froxlor now supports the new Apache 2.4. Please be aware that you need to load additional apache-modules in ordner to use it.<br />';
|
||||
$description = 'Froxlor now supports the new Apache 2.4. Please be aware that you need to load additional apache-modules in order to use it.<br />';
|
||||
$description .= '<pre>LoadModule authz_core_module modules/mod_authz_core.so
|
||||
LoadModule authz_host_module modules/mod_authz_host.so</pre><br />';
|
||||
$question = '<strong>Do you want to enable the Apache-2.4 modification?:</strong> ';
|
||||
|
||||
@@ -189,7 +189,7 @@ class Certificates extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
||||
*/
|
||||
public function listing()
|
||||
{
|
||||
// select all my (accessable) certificates
|
||||
// select all my (accessible) certificates
|
||||
$certs_stmt_query = "SELECT s.*, d.domain, d.letsencrypt, c.customerid, c.loginname
|
||||
FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` s
|
||||
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` d ON `d`.`id` = `s`.`domainid`
|
||||
@@ -237,7 +237,7 @@ class Certificates extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
||||
*/
|
||||
public function listingCount()
|
||||
{
|
||||
// select all my (accessable) certificates
|
||||
// select all my (accessible) certificates
|
||||
$certs_stmt_query = "SELECT COUNT(*) as num_certs
|
||||
FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` s
|
||||
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` d ON `d`.`id` = `s`.`domainid`
|
||||
|
||||
@@ -23,7 +23,7 @@ class CustomerBackups extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Re
|
||||
{
|
||||
|
||||
/**
|
||||
* check whether backup is enabled systemwide and if accessable for customer (hide_options)
|
||||
* check whether backup is enabled systemwide and if accessible for customer (hide_options)
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -308,7 +308,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
* @param bool $mysqls_ul
|
||||
* optional, whether customer should have unlimited mysql-databases, default 0 (false)
|
||||
* @param bool $createstdsubdomain
|
||||
* optional, whether to create a standard-subdomain ([loginname].froxlor-hostname.tld), default 0 (false)
|
||||
* optional, whether to create a standard-subdomain ([loginname].froxlor-hostname.tld), default [system.createstdsubdom_default]
|
||||
* @param bool $phpenabled
|
||||
* optional, whether to allow usage of PHP, default 0 (false)
|
||||
* @param array $allowed_phpconfigs
|
||||
@@ -316,9 +316,9 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
* @param bool $perlenabled
|
||||
* optional, whether to allow usage of Perl/CGI, default 0 (false)
|
||||
* @param bool $dnsenabled
|
||||
* optional, wether to allow usage of the DNS editor (requires activated nameserver in settings), default 0 (false)
|
||||
* optional, whether to allow usage of the DNS editor (requires activated nameserver in settings), default 0 (false)
|
||||
* @param bool $logviewenabled
|
||||
* optional, wether to allow acccess to webserver access/error-logs, default 0 (false)
|
||||
* optional, whether to allow access to webserver access/error-logs, default 0 (false)
|
||||
* @param bool $store_defaultindex
|
||||
* optional, whether to store the default index file to customers homedir
|
||||
* @param int $hosting_plan_id
|
||||
@@ -352,7 +352,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
$gender = (int) $this->getParam('gender', true, 0);
|
||||
$custom_notes = $this->getParam('custom_notes', true, '');
|
||||
$custom_notes_show = $this->getBoolParam('custom_notes_show', true, 0);
|
||||
$createstdsubdomain = $this->getBoolParam('createstdsubdomain', true, 0);
|
||||
$createstdsubdomain = $this->getBoolParam('createstdsubdomain', true, Settings::Get('system.createstdsubdom_default'));
|
||||
$password = $this->getParam('new_customer_password', true, '');
|
||||
$sendpassword = $this->getBoolParam('sendpassword', true, 0);
|
||||
$store_defaultindex = $this->getBoolParam('store_defaultindex', true, 0);
|
||||
@@ -923,9 +923,9 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
* @param bool $perlenabled
|
||||
* optional, whether to allow usage of Perl/CGI, default 0 (false)
|
||||
* @param bool $dnsenabled
|
||||
* optional, ether to allow usage of the DNS editor (requires activated nameserver in settings), default 0 (false)
|
||||
* optional, whether to allow usage of the DNS editor (requires activated nameserver in settings), default 0 (false)
|
||||
* @param bool $logviewenabled
|
||||
* optional, ether to allow acccess to webserver access/error-logs, default 0 (false)
|
||||
* optional, whether to allow access to webserver access/error-logs, default 0 (false)
|
||||
* @param string $theme
|
||||
* optional, change theme
|
||||
*
|
||||
@@ -1512,7 +1512,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
'did' => $row['id']
|
||||
), true, true);
|
||||
// remove domains DNS from powerDNS if used, #581
|
||||
\Froxlor\System\Cronjob::inserttask('11', $result['domain']);
|
||||
\Froxlor\System\Cronjob::inserttask('11', $row['domain']);
|
||||
// remove domain from acme.sh / lets encrypt if used
|
||||
\Froxlor\System\Cronjob::inserttask('12', $row['domain']);
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ class DirOptions extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable directory options
|
||||
* returns the total number of accessible directory options
|
||||
*
|
||||
* @param int $customerid
|
||||
* optional, admin-only, select directory-protections of a specific customer by id
|
||||
|
||||
@@ -305,7 +305,7 @@ class DirProtections extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Res
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable directory protections
|
||||
* returns the total number of accessible directory protections
|
||||
*
|
||||
* @param int $customerid
|
||||
* optional, admin-only, select directory-protections of a specific customer by id
|
||||
|
||||
@@ -77,7 +77,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable domains
|
||||
* returns the total number of accessible domains
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
@@ -193,6 +193,27 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
return $ipandports;
|
||||
}
|
||||
|
||||
/**
|
||||
* get ips from array of id's
|
||||
*
|
||||
* @param array $ips
|
||||
* @return array
|
||||
*/
|
||||
private function getIpsFromIdArray(array $ids)
|
||||
{
|
||||
$resultips_stmt = Database::prepare("
|
||||
SELECT `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE id = :id
|
||||
");
|
||||
$result = [];
|
||||
foreach ($ids as $id) {
|
||||
$entry = Database::pexecute_first($resultips_stmt, array(
|
||||
'id' => $id
|
||||
));
|
||||
$result[] = $entry['ip'];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* add new domain entry
|
||||
*
|
||||
@@ -574,6 +595,15 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
$include_specialsettings = 0;
|
||||
}
|
||||
|
||||
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
||||
if ($letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
||||
$domain_ips = \Froxlor\PhpHelper::gethostbynamel6($domain);
|
||||
$selected_ips = $this->getIpsFromIdArray($ssl_ipandports);
|
||||
if ($domain_ips == false || count(array_intersect($selected_ips, $domain_ips)) <= 0) {
|
||||
\Froxlor\UI\Response::standard_error('invaliddnsforletsencrypt', '', true);
|
||||
}
|
||||
}
|
||||
|
||||
// We can't enable let's encrypt for wildcard-domains
|
||||
if ($serveraliasoption == '0' && $letsencrypt == '1') {
|
||||
\Froxlor\UI\Response::standard_error('nowildcardwithletsencrypt', '', true);
|
||||
@@ -1326,6 +1356,15 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
$include_specialsettings = 0;
|
||||
}
|
||||
|
||||
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
||||
if ($letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
||||
$domain_ips = \Froxlor\PhpHelper::gethostbynamel6($result['domain']);
|
||||
$selected_ips = $this->getIpsFromIdArray($ssl_ipandports);
|
||||
if ($domain_ips == false || count(array_intersect($selected_ips, $domain_ips)) <= 0) {
|
||||
\Froxlor\UI\Response::standard_error('invaliddnsforletsencrypt', '', true);
|
||||
}
|
||||
}
|
||||
|
||||
// We can't enable let's encrypt for wildcard-domains
|
||||
if ($serveraliasoption == '0' && $letsencrypt == '1') {
|
||||
\Froxlor\UI\Response::standard_error('nowildcardwithletsencrypt', '', true);
|
||||
@@ -1702,9 +1741,6 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
");
|
||||
Database::pexecute($_update_stmt, $_update_data, true, true);
|
||||
|
||||
// insert a rebuild-task
|
||||
\Froxlor\System\Cronjob::inserttask('1');
|
||||
|
||||
// Cleanup domain <-> ip mapping
|
||||
$del_stmt = Database::prepare("
|
||||
DELETE FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_domain` = :id
|
||||
|
||||
@@ -326,7 +326,7 @@ class Emails extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable email addresses
|
||||
* returns the total number of accessible email addresses
|
||||
*
|
||||
* @param int $customerid
|
||||
* optional, admin-only, select email addresses of a specific customer by id
|
||||
|
||||
@@ -79,7 +79,7 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable fpm daemons
|
||||
* returns the total number of accessible fpm daemons
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
|
||||
@@ -62,7 +62,7 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
|
||||
|
||||
if (($this->getUserDetail('ftps_used') < $this->getUserDetail('ftps') || $this->getUserDetail('ftps') == '-1') || $this->isAdmin() && $is_defaultuser == 1) {
|
||||
|
||||
// required paramters
|
||||
// required parameters
|
||||
$path = $this->getParam('path');
|
||||
$password = $this->getParam('ftp_password');
|
||||
|
||||
@@ -512,7 +512,7 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable ftp accounts
|
||||
* returns the total number of accessible ftp accounts
|
||||
*
|
||||
* @param int $customerid
|
||||
* optional, admin-only, select ftp-users of a specific customer by id
|
||||
|
||||
@@ -66,7 +66,7 @@ class HostingPlans extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable hosting plans
|
||||
* returns the total number of accessible hosting plans
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
@@ -182,9 +182,9 @@ class HostingPlans extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
||||
* @param bool $perlenabled
|
||||
* optional, whether to allow usage of Perl/CGI, default 0 (false)
|
||||
* @param bool $dnsenabled
|
||||
* optional, ether to allow usage of the DNS editor (requires activated nameserver in settings), default 0 (false)
|
||||
* optional, whether to allow usage of the DNS editor (requires activated nameserver in settings), default 0 (false)
|
||||
* @param bool $logviewenabled
|
||||
* optional, ether to allow acccess to webserver access/error-logs, default 0 (false)
|
||||
* optional, whether to allow access to webserver access/error-logs, default 0 (false)
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
@@ -309,9 +309,9 @@ class HostingPlans extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
||||
* @param bool $perlenabled
|
||||
* optional, whether to allow usage of Perl/CGI, default 0 (false)
|
||||
* @param bool $dnsenabled
|
||||
* optional, ether to allow usage of the DNS editor (requires activated nameserver in settings), default 0 (false)
|
||||
* optional, either to allow usage of the DNS editor (requires activated nameserver in settings), default 0 (false)
|
||||
* @param bool $logviewenabled
|
||||
* optional, ether to allow acccess to webserver access/error-logs, default 0 (false)
|
||||
* optional, either to allow access to webserver access/error-logs, default 0 (false)
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
|
||||
@@ -65,7 +65,7 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable ip/port entries
|
||||
* returns the total number of accessible ip/port entries
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
@@ -247,6 +247,9 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
$docroot = '';
|
||||
}
|
||||
|
||||
// always use compressed ipv6 format
|
||||
$ip = inet_ntop(inet_pton($ip));
|
||||
|
||||
$result_checkfordouble_stmt = Database::prepare("
|
||||
SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "`
|
||||
WHERE `ip` = :ip AND `port` = :port");
|
||||
@@ -462,6 +465,9 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
$docroot = '';
|
||||
}
|
||||
|
||||
// always use compressed ipv6 format
|
||||
$ip = inet_ntop(inet_pton($ip));
|
||||
|
||||
if ($result['ip'] != $ip && $result['ip'] == Settings::Get('system.ipaddress') && $result_sameipotherport == false) {
|
||||
\Froxlor\UI\Response::standard_error('cantchangesystemip', '', true);
|
||||
} elseif ($result_checkfordouble && $result_checkfordouble['id'] != '' && $result_checkfordouble['id'] != $id) {
|
||||
|
||||
@@ -17,7 +17,7 @@ use Froxlor\Settings;
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package API
|
||||
* @since 0.10.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntity
|
||||
{
|
||||
@@ -31,25 +31,28 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
* optional, default is 0
|
||||
* @param string $description
|
||||
* optional, description for database
|
||||
* @param string $custom_suffix
|
||||
* optional, name for database
|
||||
* @param bool $sendinfomail
|
||||
* optional, send created resource-information to customer, default: false
|
||||
* @param int $customerid
|
||||
* optional, required when called as admin (if $loginname is not specified)
|
||||
* @param string $loginname
|
||||
* optional, required when called as admin (if $customerid is not specified)
|
||||
*
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws \Exception
|
||||
* @return string json-encoded array
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
// required paramters
|
||||
// required parameters
|
||||
$password = $this->getParam('mysql_password');
|
||||
|
||||
// parameters
|
||||
$dbserver = $this->getParam('mysql_server', true, 0);
|
||||
$databasedescription = $this->getParam('description', true, '');
|
||||
$databasename = $this->getParam('custom_suffix', true, '');
|
||||
$sendinfomail = $this->getBoolParam('sendinfomail', true, 0);
|
||||
// get needed customer info to reduce the mysql-usage-counter by one
|
||||
$customer = $this->getCustomerData('mysqls');
|
||||
@@ -58,6 +61,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
||||
$password = \Froxlor\System\Crypt::validatePassword($password, true);
|
||||
$databasedescription = \Froxlor\Validate\Validate::validate(trim($databasedescription), 'description', '', '', array(), true);
|
||||
$databasename = \Froxlor\Validate\Validate::validate(trim($databasename), 'database_name', '', '', array(), true);
|
||||
|
||||
// validate whether the dbserver exists
|
||||
$dbserver = \Froxlor\Validate\Validate::validate($dbserver, html_entity_decode($this->lng['mysql']['mysql_server']), '', '', 0, true);
|
||||
@@ -79,7 +83,12 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
);
|
||||
// create database, user, set permissions, etc.pp.
|
||||
$dbm = new \Froxlor\Database\DbManager($this->logger());
|
||||
$username = $dbm->createDatabase($newdb_params['loginname'], $password, $newdb_params['mysql_lastaccountnumber']);
|
||||
|
||||
if(strtoupper(Settings::Get('customer.mysqlprefix')) == 'DBNAME' && !empty($databasename)) {
|
||||
$username = $dbm->createDatabase($newdb_params['loginname'].'_'.$databasename, $password);
|
||||
} else {
|
||||
$username = $dbm->createDatabase($newdb_params['loginname'], $password, $newdb_params['mysql_lastaccountnumber']);
|
||||
}
|
||||
|
||||
// we've checked against the password in dbm->createDatabase
|
||||
if ($username == false) {
|
||||
@@ -181,7 +190,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
* optional, the databasename
|
||||
* @param int $mysql_server
|
||||
* optional, specify database-server, default is none
|
||||
*
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws \Exception
|
||||
* @return string json-encoded array
|
||||
@@ -281,7 +290,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
* optional, required when called as admin (if $loginname is not specified)
|
||||
* @param string $loginname
|
||||
* optional, required when called as admin (if $customerid is not specified)
|
||||
*
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws \Exception
|
||||
* @return string json-encoded array
|
||||
@@ -305,7 +314,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
));
|
||||
$id = $result['id'];
|
||||
|
||||
// paramters
|
||||
// parameters
|
||||
$password = $this->getParam('mysql_password', true, '');
|
||||
$databasedescription = $this->getParam('description', true, $result['description']);
|
||||
|
||||
@@ -370,7 +379,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
* optional specify offset for resultset
|
||||
* @param array $sql_orderby
|
||||
* optional array with index = fieldname and value = ASC|DESC to order the resultset by one or more fields
|
||||
*
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws \Exception
|
||||
* @return string json-encoded array count|list
|
||||
@@ -428,13 +437,13 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable databases
|
||||
* returns the total number of accessible databases
|
||||
*
|
||||
* @param int $customerid
|
||||
* optional, admin-only, select dbs of a specific customer by id
|
||||
* @param string $loginname
|
||||
* optional, admin-only, select dbs of a specific customer by loginname
|
||||
*
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws \Exception
|
||||
* @return string json-encoded array
|
||||
@@ -465,7 +474,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
* optional, required when called as admin (if $loginname is not specified)
|
||||
* @param string $loginname
|
||||
* optional, required when called as admin (if $customerid is not specified)
|
||||
*
|
||||
*
|
||||
* @access admin, customer
|
||||
* @throws \Exception
|
||||
* @return string json-encoded array
|
||||
|
||||
@@ -122,7 +122,7 @@ class PhpSettings extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable php-setting entries
|
||||
* returns the total number of accessible php-setting entries
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
namespace Froxlor\Api\Commands;
|
||||
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Domain\Domain;
|
||||
use Froxlor\Settings;
|
||||
|
||||
/**
|
||||
@@ -230,6 +231,15 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
}
|
||||
}
|
||||
|
||||
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
||||
if ($letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
||||
$our_ips = Domain::getIpsOfDomain($domain_check['id']);
|
||||
$domain_ips = \Froxlor\PhpHelper::gethostbynamel6($completedomain);
|
||||
if ($domain_ips == false || count(array_intersect($our_ips, $domain_ips)) <= 0) {
|
||||
\Froxlor\UI\Response::standard_error('invaliddnsforletsencrypt', '', true);
|
||||
}
|
||||
}
|
||||
|
||||
// Temporarily deactivate ssl_redirect until Let's Encrypt certificate was generated
|
||||
if ($ssl_redirect > 0 && $letsencrypt == 1) {
|
||||
$ssl_redirect = 2;
|
||||
@@ -595,6 +605,15 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
}
|
||||
}
|
||||
|
||||
// validate dns if lets encrypt is enabled to check whether we can use it at all
|
||||
if ($result['letsencrypt'] != $letsencrypt && $letsencrypt == '1' && Settings::Get('system.le_domain_dnscheck') == '1') {
|
||||
$our_ips = Domain::getIpsOfDomain($result['parentdomainid']);
|
||||
$domain_ips = \Froxlor\PhpHelper::gethostbynamel6($result['domain']);
|
||||
if ($domain_ips == false || count(array_intersect($our_ips, $domain_ips)) <= 0) {
|
||||
\Froxlor\UI\Response::standard_error('invaliddnsforletsencrypt', '', true);
|
||||
}
|
||||
}
|
||||
|
||||
// We can't enable let's encrypt for wildcard-domains
|
||||
if ($iswildcarddomain == '1' && $letsencrypt == '1') {
|
||||
\Froxlor\UI\Response::standard_error('nowildcardwithletsencrypt');
|
||||
@@ -624,7 +643,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
\Froxlor\Domain\Domain::updateRedirectOfDomain($id, $redirectcode);
|
||||
}
|
||||
|
||||
if ($path != $result['documentroot'] || $isemaildomain != $result['isemaildomain'] || $wwwserveralias != $result['wwwserveralias'] || $iswildcarddomain != $result['iswildcarddomain'] || $aliasdomain != $result['aliasdomain'] || $openbasedir_path != $result['openbasedir_path'] || $ssl_redirect != $result['ssl_redirect'] || $letsencrypt != $result['letsencrypt'] || $hsts_maxage != $result['hsts'] || $hsts_sub != $result['hsts_sub'] || $hsts_preload != $result['hsts_preload'] || $phpsettingid != $result['phpsettingid']) {
|
||||
if ($path != $result['documentroot'] || $isemaildomain != $result['isemaildomain'] || $wwwserveralias != $result['wwwserveralias'] || $iswildcarddomain != $result['iswildcarddomain'] || $aliasdomain != (int)$result['aliasdomain'] || $openbasedir_path != $result['openbasedir_path'] || $ssl_redirect != $result['ssl_redirect'] || $letsencrypt != $result['letsencrypt'] || $hsts_maxage != $result['hsts'] || $hsts_sub != $result['hsts_sub'] || $hsts_preload != $result['hsts_preload'] || $phpsettingid != $result['phpsettingid']) {
|
||||
$stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
|
||||
`documentroot` = :documentroot,
|
||||
@@ -810,7 +829,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the total number of accessable subdomain entries
|
||||
* returns the total number of accessible subdomain entries
|
||||
*
|
||||
* @param int $customerid
|
||||
* optional, admin-only, select (sub)domains of a specific customer by id
|
||||
|
||||
@@ -150,7 +150,7 @@ abstract class BulkAction
|
||||
|
||||
/**
|
||||
* reads in the csv import file and returns an array with
|
||||
* all the entites to be imported
|
||||
* all the entities to be imported
|
||||
*
|
||||
* @param string $separator
|
||||
*
|
||||
|
||||
@@ -402,7 +402,7 @@ class ConfigServicesAction extends \Froxlor\Cli\Action
|
||||
} elseif (! file_exists($this->_args["froxlor-dir"])) {
|
||||
throw new \Exception("Given froxlor directory cannot be found ('" . $this->_args["froxlor-dir"] . "')");
|
||||
} elseif (! is_readable($this->_args["froxlor-dir"])) {
|
||||
throw new \Exception("Given froxlor direcotry cannot be read ('" . $this->_args["froxlor-dir"] . "')");
|
||||
throw new \Exception("Given froxlor directory cannot be read ('" . $this->_args["froxlor-dir"] . "')");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class SwitchServerIpAction extends \Froxlor\Cli\Action
|
||||
$ip_list = $this->_args['switch'];
|
||||
|
||||
if (empty($ip_list) || is_bool($ip_list)) {
|
||||
throw new \Exception("No paramters given for --switch action.");
|
||||
throw new \Exception("No parameters given for --switch action.");
|
||||
}
|
||||
|
||||
$ips_to_switch = array();
|
||||
@@ -179,7 +179,7 @@ class SwitchServerIpAction extends \Froxlor\Cli\Action
|
||||
} elseif (! file_exists($this->_args["froxlor-dir"])) {
|
||||
throw new \Exception("Given froxlor directory cannot be found ('" . $this->_args["froxlor-dir"] . "')");
|
||||
} elseif (! is_readable($this->_args["froxlor-dir"])) {
|
||||
throw new \Exception("Given froxlor direcotry cannot be read ('" . $this->_args["froxlor-dir"] . "')");
|
||||
throw new \Exception("Given froxlor directory cannot be read ('" . $this->_args["froxlor-dir"] . "')");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class ConfigDaemon
|
||||
private $isparsed = false;
|
||||
|
||||
/**
|
||||
* Sub - area of the full - XML only holding the daemon - data we are interessted in
|
||||
* Sub - area of the full - XML only holding the daemon - data we are interested in
|
||||
*
|
||||
* @var \SimpleXMLElement
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Froxlor\Cron\Dns;
|
||||
|
||||
use Froxlor\Settings;
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 the Froxlor Team (see authors).
|
||||
@@ -13,7 +15,7 @@ namespace Froxlor\Cron\Dns;
|
||||
* @author Froxlor team <team@froxlor.org> (2016-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
*
|
||||
*
|
||||
*/
|
||||
class PowerDNS extends DnsBase
|
||||
{
|
||||
@@ -111,15 +113,16 @@ class PowerDNS extends DnsBase
|
||||
|
||||
private function insertZone($domainname, $serial = 0)
|
||||
{
|
||||
$ins_stmt = \Froxlor\Dns\PowerDNS::getDB()->prepare("
|
||||
INSERT INTO domains set `name` = :domainname, `notified_serial` = :serial, `type` = 'NATIVE'
|
||||
$ins_stmt = \Froxlor\Dns\PowerDNS::getDB()->prepare("
|
||||
INSERT INTO domains set `name` = :domainname, `notified_serial` = :serial, `type` = :type
|
||||
");
|
||||
$ins_stmt->execute(array(
|
||||
'domainname' => $domainname,
|
||||
'serial' => $serial
|
||||
));
|
||||
$lastid = \Froxlor\Dns\PowerDNS::getDB()->lastInsertId();
|
||||
return $lastid;
|
||||
$ins_stmt->execute(array(
|
||||
'domainname' => $domainname,
|
||||
'serial' => $serial,
|
||||
'type' => strtoupper(Settings::Get('system.powerdns_mode'))
|
||||
));
|
||||
$lastid = \Froxlor\Dns\PowerDNS::getDB()->lastInsertId();
|
||||
return $lastid;;
|
||||
}
|
||||
|
||||
private function insertRecords($domainid = 0, $records = array(), $origin = "")
|
||||
|
||||
@@ -826,7 +826,7 @@ class Apache extends HttpConfigBase
|
||||
// After inserting the AWStats information,
|
||||
// be sure to build the awstats conf file as well
|
||||
// and chown it using $awstats_params, #258
|
||||
// Bug 960 + Bug 970 : Use full $domain instead of custom $awstats_params as following classes depend on the informations
|
||||
// Bug 960 + Bug 970 : Use full $domain instead of custom $awstats_params as following classes depend on the information
|
||||
\Froxlor\Http\Statistics::createAWStatsConf(Settings::Get('system.logfiles_directory') . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot'], $domain);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ class ConfigIO
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a file/direcotry from the settings and checks whether it exists
|
||||
* returns a file/directory from the settings and checks whether it exists
|
||||
*
|
||||
* @param string $group
|
||||
* settings-group
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -678,7 +678,7 @@ class Lighttpd extends HttpConfigBase
|
||||
// After inserting the AWStats information,
|
||||
// be sure to build the awstats conf file as well
|
||||
// and chown it using $awstats_params, #258
|
||||
// Bug 960 + Bug 970 : Use full $domain instead of custom $awstats_params as following classes depend on the informations
|
||||
// Bug 960 + Bug 970 : Use full $domain instead of custom $awstats_params as following classes depend on the information
|
||||
\Froxlor\Http\Statistics::createAWStatsConf(Settings::Get('system.logfiles_directory') . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot'], $domain);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1153,7 +1153,7 @@ class Nginx extends HttpConfigBase
|
||||
// After inserting the AWStats information,
|
||||
// be sure to build the awstats conf file as well
|
||||
// and chown it using $awstats_params, #258
|
||||
// Bug 960 + Bug 970 : Use full $domain instead of custom $awstats_params as following classes depend on the informations
|
||||
// Bug 960 + Bug 970 : Use full $domain instead of custom $awstats_params as following classes depend on the information
|
||||
\Froxlor\Http\Statistics::createAWStatsConf(Settings::Get('system.logfiles_directory') . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot'], $domain);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class Fcgid
|
||||
// Set Binary
|
||||
$starter_file .= "exec " . $phpconfig['binary'] . " -c " . escapeshellarg($this->getConfigDir()) . "\n";
|
||||
|
||||
// remove +i attibute, so starter can be overwritten
|
||||
// remove +i attribute, so starter can be overwritten
|
||||
if (file_exists($this->getStarterFile())) {
|
||||
\Froxlor\FileDir::removeImmutable($this->getStarterFile());
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
namespace Froxlor\Cron\System;
|
||||
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Settings;
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
@@ -25,12 +26,13 @@ class Extrausers
|
||||
// passwd
|
||||
$passwd = '/var/lib/extrausers/passwd';
|
||||
$sql = "SELECT customerid,username,'x' as password,uid,gid,'Froxlor User' as comment,homedir,shell, login_enabled FROM ftp_users ORDER BY uid, LENGTH(username) ASC";
|
||||
self::generateFile($passwd, $sql, $cronlog);
|
||||
$users_list = [];
|
||||
self::generateFile($passwd, $sql, $cronlog, $users_list);
|
||||
|
||||
// group
|
||||
$group = '/var/lib/extrausers/group';
|
||||
$sql = "SELECT groupname,'x' as password,gid,members FROM ftp_groups ORDER BY gid ASC";
|
||||
self::generateFile($group, $sql, $cronlog);
|
||||
self::generateFile($group, $sql, $cronlog, $users_list);
|
||||
|
||||
// shadow
|
||||
$shadow = '/var/lib/extrausers/shadow';
|
||||
@@ -44,7 +46,7 @@ class Extrausers
|
||||
@chmod('/var/lib/extrausers/shadow', 0640);
|
||||
}
|
||||
|
||||
private static function generateFile($file, $query, &$cronlog)
|
||||
private static function generateFile($file, $query, &$cronlog, &$result_list = null)
|
||||
{
|
||||
$type = basename($file);
|
||||
$cronlog->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_NOTICE, 'Creating ' . $type . ' file');
|
||||
@@ -74,6 +76,9 @@ class Extrausers
|
||||
$u['comment'] = 'Locked Froxlor User';
|
||||
}
|
||||
$line = $u['username'] . ':' . $u['password'] . ':' . $u['uid'] . ':' . $u['gid'] . ':' . $u['comment'] . ':' . $u['homedir'] . ':' . $u['shell'] . PHP_EOL;
|
||||
if (is_array($result_list)) {
|
||||
$result_list[] = $u['username'];
|
||||
}
|
||||
break;
|
||||
case 'group':
|
||||
$line = $u['groupname'] . ':' . $u['password'] . ':' . $u['gid'] . ':' . $u['members'] . PHP_EOL;
|
||||
@@ -84,6 +89,19 @@ class Extrausers
|
||||
}
|
||||
$data_content .= $line;
|
||||
}
|
||||
|
||||
// check for local group to generate
|
||||
if ($type == 'group' && Settings::Get('system.froxlorusergroup') != '') {
|
||||
$guid = intval(Settings::Get('system.froxlorusergroup_gid'));
|
||||
if (empty($guid)) {
|
||||
$guid = intval(Settings::Get('system.lastguid')) + 1;
|
||||
Settings::Set('system.lastguid', $guid, true);
|
||||
Settings::Set('system.froxlorusergroup_gid', $guid, true);
|
||||
}
|
||||
$line = Settings::Get('system.froxlorusergroup') . ':x:' . $guid . ':' . implode(',', $result_list) . PHP_EOL;
|
||||
$data_content .= $line;
|
||||
}
|
||||
|
||||
if (file_put_contents($file, $data_content) !== false) {
|
||||
$cronlog->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_NOTICE, 'Succesfully wrote ' . $type . ' file');
|
||||
} else {
|
||||
|
||||
@@ -69,7 +69,7 @@ class TrafficCron extends \Froxlor\Cron\FroxlorCron
|
||||
}
|
||||
|
||||
/**
|
||||
* TRAFFIC AND DISKUSAGE MESSURE
|
||||
* TRAFFIC AND DISKUSAGE MEASURE
|
||||
*/
|
||||
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_INFO, 'Traffic run started...');
|
||||
$admin_traffic = array();
|
||||
|
||||
@@ -165,7 +165,7 @@ class Database
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the sql-access data as array using indeces
|
||||
* returns the sql-access data as array using indices
|
||||
* 'user', 'passwd' and 'host'.
|
||||
* Returns false if not enabled
|
||||
*
|
||||
|
||||
@@ -16,9 +16,9 @@ use Froxlor\Settings;
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Classes
|
||||
*
|
||||
*
|
||||
* @since 0.9.31
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -87,6 +87,8 @@ class DbManager
|
||||
while (in_array($username, $allsqlusers)) {
|
||||
$username = $loginname . '-' . substr(md5(uniqid(microtime(), 1)), 20, 3);
|
||||
}
|
||||
} elseif (strtoupper(Settings::Get('customer.mysqlprefix')) == 'DBNAME') {
|
||||
$username = $loginname;
|
||||
} else {
|
||||
$username = $loginname . Settings::Get('customer.mysqlprefix') . (intval($last_accnumber) + 1);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class IntegrityCheck
|
||||
'dbname' => Database::getDbName()
|
||||
));
|
||||
$charset = isset($resp['default_character_set_name']) ? $resp['default_character_set_name'] : null;
|
||||
if (! empty($charset) && strtolower($charset) != 'utf8') {
|
||||
if (! empty($charset) && substr(strtolower($charset), 0, 4) != 'utf8') {
|
||||
$this->log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "database charset seems to be different from UTF-8, integrity-check can fix that");
|
||||
if ($fix) {
|
||||
// fix database
|
||||
|
||||
@@ -338,11 +338,28 @@ class Dns
|
||||
foreach ($records as $record) {
|
||||
if ($record == '@CAA@') {
|
||||
$caa_entries = explode(PHP_EOL, Settings::Get('caa.caa_entry'));
|
||||
if ($domain['letsencrypt'] == 1) {
|
||||
$le_entry = $domain['iswildcarddomain'] == '1' ? '0 issuewild "letsencrypt.org"' : '0 issue "letsencrypt.org"';
|
||||
array_push($caa_entries, $le_entry);
|
||||
$caa_domain = "letsencrypt.org";
|
||||
if (Settings::Get('system.letsencryptca') == 'buypass' || Settings::Get('system.letsencryptca') == 'buypass_test') {
|
||||
$caa_domain = "buypass.com";
|
||||
}
|
||||
if ($domain['letsencrypt'] == 1) {
|
||||
if (Settings::Get('system.letsencryptca') == 'zerossl') {
|
||||
$caa_domains = [
|
||||
"sectigo.com",
|
||||
"trust-provider.com",
|
||||
"usertrust.com",
|
||||
"comodoca.com",
|
||||
"comodo.com"
|
||||
];
|
||||
foreach ($caa_domains as $caa_domain) {
|
||||
$le_entry = $domain['iswildcarddomain'] == '1' ? '0 issuewild "' . $caa_domain . '"' : '0 issue "' . $caa_domain . '"';
|
||||
array_push($caa_entries, $le_entry);
|
||||
}
|
||||
} else {
|
||||
$le_entry = $domain['iswildcarddomain'] == '1' ? '0 issuewild "' . $caa_domain . '"' : '0 issue "' . $caa_domain . '"';
|
||||
array_push($caa_entries, $le_entry);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($caa_entries as $entry) {
|
||||
if (empty($entry)) continue;
|
||||
$zonerecords[] = new DnsEntry('@', 'CAA', $entry);
|
||||
@@ -386,7 +403,7 @@ class Dns
|
||||
$soa_content = $primary_ns . " " . self::escapeSoaAdminMail($soa_email) . " ";
|
||||
$soa_content .= $domain['bindserial'] . " ";
|
||||
// TODO for now, dummy time-periods
|
||||
$soa_content .= "3600 900 604800 " . (int) Settings::Get('system.defaultttl');
|
||||
$soa_content .= "3600 900 1209600 1200";
|
||||
|
||||
$soa_record = new DnsEntry('@', 'SOA', $soa_content);
|
||||
array_unshift($zonerecords, $soa_record);
|
||||
|
||||
@@ -370,7 +370,7 @@ class FileDir
|
||||
* @param
|
||||
* integer uid The uid which must match the found directories
|
||||
* @param
|
||||
* integer gid The gid which must match the found direcotries
|
||||
* integer gid The gid which must match the found directories
|
||||
* @param
|
||||
* string value the value for the input-field
|
||||
*
|
||||
@@ -461,7 +461,7 @@ class FileDir
|
||||
* @param int $uid
|
||||
* the uid which must match the found directories
|
||||
* @param int $gid
|
||||
* the gid which must match the found direcotries
|
||||
* the gid which must match the found directories
|
||||
*
|
||||
* @return array Array of found valid paths
|
||||
*/
|
||||
|
||||
@@ -7,10 +7,10 @@ final class Froxlor
|
||||
{
|
||||
|
||||
// Main version variable
|
||||
const VERSION = '0.10.27';
|
||||
const VERSION = '0.10.28';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
const DBVERSION = '202107070';
|
||||
const DBVERSION = '202108180';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
const BRANDING = '';
|
||||
|
||||
@@ -157,7 +157,7 @@ class FroxlorLogger
|
||||
echo "[" . $this->getLogLevelDesc($type) . "] " . $text . PHP_EOL;
|
||||
}
|
||||
|
||||
// warnings, errors and critical mesages WILL be logged
|
||||
// warnings, errors and critical messages WILL be logged
|
||||
if (Settings::Get('logger.log_cron') == '0' && $action == \Froxlor\FroxlorLogger::CRON_ACTION && $type > LOG_WARNING) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -241,10 +241,14 @@ class PhpHelper
|
||||
$ips = array();
|
||||
foreach ($dns as $record) {
|
||||
if ($record["type"] == "A") {
|
||||
$ips[] = $record["ip"];
|
||||
// always use compressed ipv6 format
|
||||
$ip = inet_ntop(inet_pton($record["ip"]));
|
||||
$ips[] = $ip;
|
||||
}
|
||||
if ($record["type"] == "AAAA") {
|
||||
$ips[] = $record["ipv6"];
|
||||
// always use compressed ipv6 format
|
||||
$ip = inet_ntop(inet_pton($record["ipv6"]));
|
||||
$ips[] = $ip;
|
||||
}
|
||||
}
|
||||
if (count($ips) < 1) {
|
||||
|
||||
@@ -118,7 +118,7 @@ class SImExporter
|
||||
if ($_sha != sha1(var_export($_data, true))) {
|
||||
throw new \Exception("SHA check of import data failed. Unable to import.");
|
||||
}
|
||||
// do not import version info - but we need that to possibily update settings
|
||||
// do not import version info - but we need that to possibly update settings
|
||||
// when there were changes in the variable-name or similar
|
||||
unset($_data['panel.version']);
|
||||
unset($_data['panel.db_version']);
|
||||
|
||||
@@ -59,20 +59,20 @@ class Crypt
|
||||
}
|
||||
|
||||
/**
|
||||
* Make crypted password from clear text password
|
||||
* Make encrypted password from clear text password
|
||||
*
|
||||
* @author Michal Wojcik <m.wojcik@sonet3.pl>
|
||||
* @author Michael Kaufmann <mkaufmann@nutime.de>
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
*
|
||||
* 0 - default crypt (depenend on system configuration)
|
||||
* 0 - default crypt (depends on system configuration)
|
||||
* 1 - MD5 $1$
|
||||
* 2 - BLOWFISH $2y$07$
|
||||
* 3 - SHA-256 $5$ (default)
|
||||
* 4 - SHA-512 $6$
|
||||
*
|
||||
* @param string $password
|
||||
* Password to be crypted
|
||||
* Password to be encrypted
|
||||
* @param bool $htpasswd
|
||||
* optional whether to generate a SHA1 password for directory protection
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@ class Mailer extends \PHPMailer\PHPMailer\PHPMailer
|
||||
{
|
||||
|
||||
/**
|
||||
* class construtor
|
||||
* class constructor
|
||||
*
|
||||
* @param string $exceptions
|
||||
* whether to throw exceptions or not
|
||||
|
||||
@@ -77,7 +77,7 @@ class User
|
||||
}
|
||||
|
||||
/**
|
||||
* Function which updates all counters of used ressources in panel_admins and panel_customers
|
||||
* Function which updates all counters of used resources in panel_admins and panel_customers
|
||||
*
|
||||
* @param bool $returndebuginfo
|
||||
* Set to true to get an array with debug information
|
||||
@@ -237,7 +237,7 @@ class User
|
||||
$admin_domains = Database::pexecute_first($admin_domains_stmt, array(
|
||||
"aid" => $admin['adminid']
|
||||
));
|
||||
// substract the amount of domains that are std-subdomains later when we iterated through all customers and know for sure
|
||||
// subtract the amount of domains that are std-subdomains later when we iterated through all customers and know for sure
|
||||
$admin['domains_used_new'] = $admin_domains['number_domains'];
|
||||
// set current admin
|
||||
$cur_adm = $admin['adminid'];
|
||||
|
||||
@@ -74,7 +74,7 @@ class Check
|
||||
|
||||
public static function checkMysqlAccessHost($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
|
||||
{
|
||||
$mysql_access_host_array = array_map('trim', explode(',', $newfieldvalue));
|
||||
$mysql_access_host_array = array_unique(array_map('trim', explode(',', $newfieldvalue)));
|
||||
|
||||
foreach ($mysql_access_host_array as $host_entry) {
|
||||
if (Validate::validate_ip2($host_entry, true, 'invalidip', true, true, true, true, false) == false && Validate::validateDomain($host_entry) == false && Validate::validateLocalHostname($host_entry) == false && $host_entry != '%') {
|
||||
@@ -207,4 +207,30 @@ class Check
|
||||
}
|
||||
return $returnvalue;
|
||||
}
|
||||
|
||||
public static function checkLocalGroup($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
|
||||
{
|
||||
if (empty($newfieldvalue) || $fielddata == $newfieldvalue) {
|
||||
$returnvalue = [
|
||||
self::FORMFIELDS_PLAUSIBILITY_CHECK_OK
|
||||
];
|
||||
} elseif (function_exists('posix_getgrnam') && posix_getgrnam($newfieldvalue) == false) {
|
||||
if (Validate::validateUsername($newfieldvalue, Settings::Get('panel.unix_names'), 32)) {
|
||||
$returnvalue = [
|
||||
self::FORMFIELDS_PLAUSIBILITY_CHECK_OK
|
||||
];
|
||||
} else {
|
||||
$returnvalue = [
|
||||
self::FORMFIELDS_PLAUSIBILITY_CHECK_ERROR,
|
||||
'local_group_invalid'
|
||||
];
|
||||
}
|
||||
} else {
|
||||
$returnvalue = [
|
||||
self::FORMFIELDS_PLAUSIBILITY_CHECK_ERROR,
|
||||
'local_group_exists'
|
||||
];
|
||||
}
|
||||
return $returnvalue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ exit "$RETVAL"
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -931,7 +931,7 @@ gmysql-password=
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
# allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -2228,7 +2228,7 @@ debugger_command =
|
||||
# >$config_directory/$process_name.$process_id.log & sleep 5
|
||||
#
|
||||
# Another possibility is to run gdb under a detached screen session.
|
||||
# To attach to the screen sesssion, su root and run "screen -r
|
||||
# To attach to the screen session, su root and run "screen -r
|
||||
# <id_string>" where <id_string> uniquely matches one of the detached
|
||||
# sessions (from "screen -list").
|
||||
#
|
||||
@@ -2642,7 +2642,7 @@ driver = mysql
|
||||
# settings, like: host=sql1.host.org host=sql2.host.org
|
||||
#
|
||||
# pgsql:
|
||||
# For available options, see the PostgreSQL documention for the
|
||||
# For available options, see the PostgreSQL documentation for the
|
||||
# PQconnectdb function of libpq.
|
||||
# Use maxconns=n (default 5) to change how many connections Dovecot can
|
||||
# create to pgsql.
|
||||
@@ -2745,7 +2745,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (postfix = 'Y' AND '%Ls' = 'sieve')))
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM users
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -3707,7 +3707,7 @@ protocol sieve {
|
||||
#
|
||||
# If you want UIDL compatibility with other POP3 servers, use:
|
||||
# UW's ipop3d : %08Xv%08Xu
|
||||
# Courier : %f or %v-%u (both might be used simultaneosly)
|
||||
# Courier : %f or %v-%u (both might be used simultaneously)
|
||||
# Cyrus (<= 2.1.3) : %u
|
||||
# Cyrus (>= 2.1.4) : %v.%u
|
||||
# Dovecot v0.99.x : %v.%u
|
||||
@@ -3965,7 +3965,7 @@ Port 21
|
||||
# PassivePorts 49152 65534
|
||||
|
||||
# If your host was NATted, this option is useful in order to
|
||||
# allow passive tranfers to work. You have to use your public
|
||||
# allow passive transfers to work. You have to use your public
|
||||
# address and opening the passive ports used on your firewall as well.
|
||||
# MasqueradeAddress 1.2.3.4
|
||||
|
||||
@@ -3990,7 +3990,7 @@ Group nogroup
|
||||
# Umask 022 is a good standard umask to prevent new files and dirs
|
||||
# (second parm) from being group and world writable.
|
||||
Umask 022 022
|
||||
# Normally, we want files to be overwriteable.
|
||||
# Normally, we want files to be overwritable.
|
||||
AllowOverwrite on
|
||||
|
||||
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
|
||||
@@ -4237,7 +4237,7 @@ SQLBackend mysql
|
||||
SQLEngine on
|
||||
SQLAuthenticate on
|
||||
#
|
||||
# Use both a crypted or plaintext password
|
||||
# Use both an encrypted or plaintext password
|
||||
SQLAuthTypes Crypt
|
||||
|
||||
SQLAuthenticate users* groups*
|
||||
@@ -4295,7 +4295,7 @@ TLSVerifyClient off
|
||||
#TLSRequired on
|
||||
|
||||
# Allow SSL/TLS renegotiations when the client requests them, but
|
||||
# do not force the renegotations. Some clients do not support
|
||||
# do not force the renegotiations. Some clients do not support
|
||||
# SSL/TLS renegotiations; when mod_tls forces a renegotiation, these
|
||||
# clients will close the data connection, or there will be a timeout
|
||||
# on an idle data connection.
|
||||
@@ -4595,7 +4595,7 @@ aliases: files
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -377,7 +377,7 @@ exit "$RETVAL"
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -905,7 +905,7 @@ gmysql-password=
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
# allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -2187,7 +2187,7 @@ debugger_command =
|
||||
# >$config_directory/$process_name.$process_id.log & sleep 5
|
||||
#
|
||||
# Another possibility is to run gdb under a detached screen session.
|
||||
# To attach to the screen sesssion, su root and run "screen -r
|
||||
# To attach to the screen session, su root and run "screen -r
|
||||
# <id_string>" where <id_string> uniquely matches one of the detached
|
||||
# sessions (from "screen -list").
|
||||
#
|
||||
@@ -2707,7 +2707,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (postfix = 'Y' AND '%Ls' = 'sieve')))
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM mail_users
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -4174,7 +4174,7 @@ Port 21
|
||||
# PassivePorts 49152 65534
|
||||
|
||||
# If your host was NATted, this option is useful in order to
|
||||
# allow passive tranfers to work. You have to use your public
|
||||
# allow passive transfers to work. You have to use your public
|
||||
# address and opening the passive ports used on your firewall as well.
|
||||
# MasqueradeAddress 1.2.3.4
|
||||
|
||||
@@ -4199,7 +4199,7 @@ Group nogroup
|
||||
# Umask 022 is a good standard umask to prevent new files and dirs
|
||||
# (second parm) from being group and world writable.
|
||||
Umask 022 022
|
||||
# Normally, we want files to be overwriteable.
|
||||
# Normally, we want files to be overwritable.
|
||||
AllowOverwrite on
|
||||
|
||||
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
|
||||
@@ -4448,7 +4448,7 @@ SQLBackend mysql
|
||||
SQLEngine on
|
||||
SQLAuthenticate on
|
||||
#
|
||||
# Use both a crypted or plaintext password
|
||||
# Use both an encrypted or plaintext password
|
||||
SQLAuthTypes Crypt
|
||||
|
||||
SQLAuthenticate users* groups*
|
||||
@@ -4506,7 +4506,7 @@ TLSVerifyClient off
|
||||
#TLSRequired on
|
||||
|
||||
# Allow SSL/TLS renegotiations when the client requests them, but
|
||||
# do not force the renegotations. Some clients do not support
|
||||
# do not force the renegotiations. Some clients do not support
|
||||
# SSL/TLS renegotiations; when mod_tls forces a renegotiation, these
|
||||
# clients will close the data connection, or there will be a timeout
|
||||
# on an idle data connection.
|
||||
@@ -4806,7 +4806,7 @@ aliases: files
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -377,7 +377,7 @@ exit "$RETVAL"
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -905,7 +905,7 @@ gmysql-password=
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
# allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -2187,7 +2187,7 @@ debugger_command =
|
||||
# >$config_directory/$process_name.$process_id.log & sleep 5
|
||||
#
|
||||
# Another possibility is to run gdb under a detached screen session.
|
||||
# To attach to the screen sesssion, su root and run "screen -r
|
||||
# To attach to the screen session, su root and run "screen -r
|
||||
# <id_string>" where <id_string> uniquely matches one of the detached
|
||||
# sessions (from "screen -list").
|
||||
#
|
||||
@@ -2707,7 +2707,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (postfix = 'Y' AND '%Ls' = 'sieve')))
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM mail_users
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -4167,7 +4167,7 @@ Port 21
|
||||
# PassivePorts 49152 65534
|
||||
|
||||
# If your host was NATted, this option is useful in order to
|
||||
# allow passive tranfers to work. You have to use your public
|
||||
# allow passive transfers to work. You have to use your public
|
||||
# address and opening the passive ports used on your firewall as well.
|
||||
# MasqueradeAddress 1.2.3.4
|
||||
|
||||
@@ -4192,7 +4192,7 @@ Group nogroup
|
||||
# Umask 022 is a good standard umask to prevent new files and dirs
|
||||
# (second parm) from being group and world writable.
|
||||
Umask 022 022
|
||||
# Normally, we want files to be overwriteable.
|
||||
# Normally, we want files to be overwritable.
|
||||
AllowOverwrite on
|
||||
|
||||
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
|
||||
@@ -4439,7 +4439,7 @@ SQLBackend mysql
|
||||
SQLEngine on
|
||||
SQLAuthenticate on
|
||||
#
|
||||
# Use both a crypted or plaintext password
|
||||
# Use both an encrypted or plaintext password
|
||||
SQLAuthTypes Crypt
|
||||
|
||||
SQLAuthenticate users* groups*
|
||||
@@ -4497,7 +4497,7 @@ TLSVerifyClient off
|
||||
#TLSRequired on
|
||||
|
||||
# Allow SSL/TLS renegotiations when the client requests them, but
|
||||
# do not force the renegotations. Some clients do not support
|
||||
# do not force the renegotiations. Some clients do not support
|
||||
# SSL/TLS renegotiations; when mod_tls forces a renegotiation, these
|
||||
# clients will close the data connection, or there will be a timeout
|
||||
# on an idle data connection.
|
||||
@@ -4797,7 +4797,7 @@ aliases: files
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -226,7 +226,7 @@ query = SELECT gid FROM mail_users WHERE email = '%s'
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
# set myhostname to $mydomain because Froxlor already uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
@@ -1536,7 +1536,7 @@ protocol sieve {
|
||||
#
|
||||
# If you want UIDL compatibility with other POP3 servers, use:
|
||||
# UW's ipop3d : %08Xv%08Xu
|
||||
# Courier : %f or %v-%u (both might be used simultaneosly)
|
||||
# Courier : %f or %v-%u (both might be used simultaneously)
|
||||
# Cyrus (<= 2.1.3) : %u
|
||||
# Cyrus (>= 2.1.4) : %v.%u
|
||||
# Dovecot v0.99.x : %v.%u
|
||||
@@ -1754,7 +1754,7 @@ driver = mysql
|
||||
# settings, like: host=sql1.host.org host=sql2.host.org
|
||||
#
|
||||
# pgsql:
|
||||
# For available options, see the PostgreSQL documention for the
|
||||
# For available options, see the PostgreSQL documentation for the
|
||||
# PQconnectdb function of libpq.
|
||||
# Use maxconns=n (default 5) to change how many connections Dovecot can
|
||||
# create to pgsql.
|
||||
@@ -1857,8 +1857,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
# FROM users WHERE userid = '%u'
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM users
|
||||
iterate_query = SELECT username AS user FROM mail_users
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -2237,7 +2236,7 @@ ControlsLog /var/log/proftpd/controls.log
|
||||
DefaultRoot ~
|
||||
# Reject rootlogin (just for security)
|
||||
RootLogin off
|
||||
# Noo need to require valid shell, because user is virtual
|
||||
# No need to require valid shell, because user is virtual
|
||||
RequireValidShell off
|
||||
</Global>
|
||||
|
||||
@@ -2447,7 +2446,7 @@ aliases: files nisplus
|
||||
</content>
|
||||
</file>
|
||||
<command><![CDATA[systemctl reload-or-restart nscd.service]]></command>
|
||||
<!-- clear group chache -->
|
||||
<!-- clear group cache -->
|
||||
<command><![CDATA[nscd --invalidate=group]]></command>
|
||||
</daemon>
|
||||
<!-- Logrotate -->
|
||||
@@ -2457,7 +2456,7 @@ aliases: files nisplus
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -227,7 +227,7 @@ query = SELECT gid FROM mail_users WHERE email = '%s'
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
# set myhostname to $mydomain because Froxlor already uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
@@ -1537,7 +1537,7 @@ protocol sieve {
|
||||
#
|
||||
# If you want UIDL compatibility with other POP3 servers, use:
|
||||
# UW's ipop3d : %08Xv%08Xu
|
||||
# Courier : %f or %v-%u (both might be used simultaneosly)
|
||||
# Courier : %f or %v-%u (both might be used simultaneously)
|
||||
# Cyrus (<= 2.1.3) : %u
|
||||
# Cyrus (>= 2.1.4) : %v.%u
|
||||
# Dovecot v0.99.x : %v.%u
|
||||
@@ -1755,7 +1755,7 @@ driver = mysql
|
||||
# settings, like: host=sql1.host.org host=sql2.host.org
|
||||
#
|
||||
# pgsql:
|
||||
# For available options, see the PostgreSQL documention for the
|
||||
# For available options, see the PostgreSQL documentation for the
|
||||
# PQconnectdb function of libpq.
|
||||
# Use maxconns=n (default 5) to change how many connections Dovecot can
|
||||
# create to pgsql.
|
||||
@@ -1859,7 +1859,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM users
|
||||
iterate_query = SELECT username AS user FROM mail_users
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -2238,7 +2238,7 @@ ControlsLog /var/log/proftpd/controls.log
|
||||
DefaultRoot ~
|
||||
# Reject rootlogin (just for security)
|
||||
RootLogin off
|
||||
# Noo need to require valid shell, because user is virtual
|
||||
# No need to require valid shell, because user is virtual
|
||||
RequireValidShell off
|
||||
</Global>
|
||||
|
||||
@@ -2449,7 +2449,7 @@ aliases: files nisplus
|
||||
</content>
|
||||
</file>
|
||||
<command><![CDATA[systemctl reload-or-restart nscd.service]]></command>
|
||||
<!-- clear group chache -->
|
||||
<!-- clear group cache -->
|
||||
<command><![CDATA[nscd --invalidate=group]]></command>
|
||||
</daemon>
|
||||
<!-- Logrotate -->
|
||||
@@ -2459,7 +2459,7 @@ aliases: files nisplus
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -375,7 +375,7 @@ exit "$RETVAL"
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -918,7 +918,7 @@ gmysql-password=
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
# allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -2058,7 +2058,7 @@ driver = mysql
|
||||
# settings, like: host=sql1.host.org host=sql2.host.org
|
||||
#
|
||||
# pgsql:
|
||||
# For available options, see the PostgreSQL documention for the
|
||||
# For available options, see the PostgreSQL documentation for the
|
||||
# PQconnectdb function of libpq.
|
||||
# Use maxconns=n (default 5) to change how many connections Dovecot can
|
||||
# create to pgsql.
|
||||
@@ -2161,7 +2161,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (postfix = 'Y' AND '%Ls' = 'sieve')))
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM users
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -3123,7 +3123,7 @@ protocol sieve {
|
||||
#
|
||||
# If you want UIDL compatibility with other POP3 servers, use:
|
||||
# UW's ipop3d : %08Xv%08Xu
|
||||
# Courier : %f or %v-%u (both might be used simultaneosly)
|
||||
# Courier : %f or %v-%u (both might be used simultaneously)
|
||||
# Cyrus (<= 2.1.3) : %u
|
||||
# Cyrus (>= 2.1.4) : %v.%u
|
||||
# Dovecot v0.99.x : %v.%u
|
||||
@@ -3381,7 +3381,7 @@ Port 21
|
||||
# PassivePorts 49152 65534
|
||||
|
||||
# If your host was NATted, this option is useful in order to
|
||||
# allow passive tranfers to work. You have to use your public
|
||||
# allow passive transfers to work. You have to use your public
|
||||
# address and opening the passive ports used on your firewall as well.
|
||||
# MasqueradeAddress 1.2.3.4
|
||||
|
||||
@@ -3406,7 +3406,7 @@ Group nogroup
|
||||
# Umask 022 is a good standard umask to prevent new files and dirs
|
||||
# (second parm) from being group and world writable.
|
||||
Umask 022 022
|
||||
# Normally, we want files to be overwriteable.
|
||||
# Normally, we want files to be overwritable.
|
||||
AllowOverwrite on
|
||||
|
||||
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
|
||||
@@ -3653,7 +3653,7 @@ SQLBackend mysql
|
||||
SQLEngine on
|
||||
SQLAuthenticate on
|
||||
#
|
||||
# Use both a crypted or plaintext password
|
||||
# Use both an encrypted or plaintext password
|
||||
SQLAuthTypes Crypt
|
||||
|
||||
SQLAuthenticate users* groups*
|
||||
@@ -3711,7 +3711,7 @@ TLSVerifyClient off
|
||||
#TLSRequired on
|
||||
|
||||
# Allow SSL/TLS renegotiations when the client requests them, but
|
||||
# do not force the renegotations. Some clients do not support
|
||||
# do not force the renegotiations. Some clients do not support
|
||||
# SSL/TLS renegotiations; when mod_tls forces a renegotiation, these
|
||||
# clients will close the data connection, or there will be a timeout
|
||||
# on an idle data connection.
|
||||
@@ -4019,7 +4019,7 @@ aliases: files
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -398,7 +398,7 @@ mail IN A <SERVERIP>
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -927,7 +927,7 @@ gmysql-password=
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -1587,7 +1587,7 @@ sendmail_path = /usr/sbin/sendmail
|
||||
# FQDN from Froxlor
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# set myhostname to $mydomain because Froxlor alrady uses a FQDN
|
||||
# set myhostname to $mydomain because Froxlor already uses a FQDN
|
||||
myhostname = $mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
@@ -3762,7 +3762,7 @@ aliases: files
|
||||
</file>
|
||||
<command><![CDATA[rc-update add nscd default]]></command>
|
||||
<command><![CDATA[/etc/init.d/nscd restart]]></command>
|
||||
<!-- clear group chache -->
|
||||
<!-- clear group cache -->
|
||||
<command><![CDATA[nscd --invalidate=group]]></command>
|
||||
</daemon>
|
||||
<!-- Logrotate -->
|
||||
@@ -3772,7 +3772,7 @@ aliases: files
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -377,7 +377,7 @@ exit "$RETVAL"
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -920,7 +920,7 @@ gmysql-password=
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
# allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -2217,7 +2217,7 @@ debugger_command =
|
||||
# >$config_directory/$process_name.$process_id.log & sleep 5
|
||||
#
|
||||
# Another possibility is to run gdb under a detached screen session.
|
||||
# To attach to the screen sesssion, su root and run "screen -r
|
||||
# To attach to the screen session, su root and run "screen -r
|
||||
# <id_string>" where <id_string> uniquely matches one of the detached
|
||||
# sessions (from "screen -list").
|
||||
#
|
||||
@@ -2631,7 +2631,7 @@ driver = mysql
|
||||
# settings, like: host=sql1.host.org host=sql2.host.org
|
||||
#
|
||||
# pgsql:
|
||||
# For available options, see the PostgreSQL documention for the
|
||||
# For available options, see the PostgreSQL documentation for the
|
||||
# PQconnectdb function of libpq.
|
||||
# Use maxconns=n (default 5) to change how many connections Dovecot can
|
||||
# create to pgsql.
|
||||
@@ -2734,7 +2734,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (postfix = 'Y' AND '%Ls' = 'sieve')))
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM users
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -3696,7 +3696,7 @@ protocol sieve {
|
||||
#
|
||||
# If you want UIDL compatibility with other POP3 servers, use:
|
||||
# UW's ipop3d : %08Xv%08Xu
|
||||
# Courier : %f or %v-%u (both might be used simultaneosly)
|
||||
# Courier : %f or %v-%u (both might be used simultaneously)
|
||||
# Cyrus (<= 2.1.3) : %u
|
||||
# Cyrus (>= 2.1.4) : %v.%u
|
||||
# Dovecot v0.99.x : %v.%u
|
||||
@@ -3954,7 +3954,7 @@ Port 21
|
||||
# PassivePorts 49152 65534
|
||||
|
||||
# If your host was NATted, this option is useful in order to
|
||||
# allow passive tranfers to work. You have to use your public
|
||||
# allow passive transfers to work. You have to use your public
|
||||
# address and opening the passive ports used on your firewall as well.
|
||||
# MasqueradeAddress 1.2.3.4
|
||||
|
||||
@@ -3979,7 +3979,7 @@ Group nogroup
|
||||
# Umask 022 is a good standard umask to prevent new files and dirs
|
||||
# (second parm) from being group and world writable.
|
||||
Umask 022 022
|
||||
# Normally, we want files to be overwriteable.
|
||||
# Normally, we want files to be overwritable.
|
||||
AllowOverwrite on
|
||||
|
||||
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
|
||||
@@ -4226,7 +4226,7 @@ SQLBackend mysql
|
||||
SQLEngine on
|
||||
SQLAuthenticate on
|
||||
#
|
||||
# Use both a crypted or plaintext password
|
||||
# Use both an encrypted or plaintext password
|
||||
SQLAuthTypes Crypt
|
||||
|
||||
SQLAuthenticate users* groups*
|
||||
@@ -4284,7 +4284,7 @@ TLSVerifyClient off
|
||||
#TLSRequired on
|
||||
|
||||
# Allow SSL/TLS renegotiations when the client requests them, but
|
||||
# do not force the renegotations. Some clients do not support
|
||||
# do not force the renegotiations. Some clients do not support
|
||||
# SSL/TLS renegotiations; when mod_tls forces a renegotiation, these
|
||||
# clients will close the data connection, or there will be a timeout
|
||||
# on an idle data connection.
|
||||
@@ -4584,7 +4584,7 @@ aliases: files
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -388,7 +388,7 @@ exit "$RETVAL"
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -931,7 +931,7 @@ gmysql-password=
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
||||
#
|
||||
# allow-axfr-ips=127.0.0.0/8,::1,<NAMESERVERS_IP>
|
||||
# add these entries to the list if any speficied: <AXFRSERVERS>
|
||||
# add these entries to the list if any specified: <AXFRSERVERS>
|
||||
|
||||
#################################
|
||||
# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges.
|
||||
@@ -2228,7 +2228,7 @@ debugger_command =
|
||||
# >$config_directory/$process_name.$process_id.log & sleep 5
|
||||
#
|
||||
# Another possibility is to run gdb under a detached screen session.
|
||||
# To attach to the screen sesssion, su root and run "screen -r
|
||||
# To attach to the screen session, su root and run "screen -r
|
||||
# <id_string>" where <id_string> uniquely matches one of the detached
|
||||
# sessions (from "screen -list").
|
||||
#
|
||||
@@ -2642,7 +2642,7 @@ driver = mysql
|
||||
# settings, like: host=sql1.host.org host=sql2.host.org
|
||||
#
|
||||
# pgsql:
|
||||
# For available options, see the PostgreSQL documention for the
|
||||
# For available options, see the PostgreSQL documentation for the
|
||||
# PQconnectdb function of libpq.
|
||||
# Use maxconns=n (default 5) to change how many connections Dovecot can
|
||||
# create to pgsql.
|
||||
@@ -2745,7 +2745,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
|
||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR ((postfix = 'Y' AND '%Ls' = 'smtp') OR (postfix = 'Y' AND '%Ls' = 'sieve')))
|
||||
|
||||
# Query to get a list of all usernames.
|
||||
#iterate_query = SELECT username AS user FROM users
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
@@ -3707,7 +3707,7 @@ protocol sieve {
|
||||
#
|
||||
# If you want UIDL compatibility with other POP3 servers, use:
|
||||
# UW's ipop3d : %08Xv%08Xu
|
||||
# Courier : %f or %v-%u (both might be used simultaneosly)
|
||||
# Courier : %f or %v-%u (both might be used simultaneously)
|
||||
# Cyrus (<= 2.1.3) : %u
|
||||
# Cyrus (>= 2.1.4) : %v.%u
|
||||
# Dovecot v0.99.x : %v.%u
|
||||
@@ -3965,7 +3965,7 @@ Port 21
|
||||
# PassivePorts 49152 65534
|
||||
|
||||
# If your host was NATted, this option is useful in order to
|
||||
# allow passive tranfers to work. You have to use your public
|
||||
# allow passive transfers to work. You have to use your public
|
||||
# address and opening the passive ports used on your firewall as well.
|
||||
# MasqueradeAddress 1.2.3.4
|
||||
|
||||
@@ -3990,7 +3990,7 @@ Group nogroup
|
||||
# Umask 022 is a good standard umask to prevent new files and dirs
|
||||
# (second parm) from being group and world writable.
|
||||
Umask 022 022
|
||||
# Normally, we want files to be overwriteable.
|
||||
# Normally, we want files to be overwritable.
|
||||
AllowOverwrite on
|
||||
|
||||
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
|
||||
@@ -4237,7 +4237,7 @@ SQLBackend mysql
|
||||
SQLEngine on
|
||||
SQLAuthenticate on
|
||||
#
|
||||
# Use both a crypted or plaintext password
|
||||
# Use both an encrypted or plaintext password
|
||||
SQLAuthTypes Crypt
|
||||
|
||||
SQLAuthenticate users* groups*
|
||||
@@ -4295,7 +4295,7 @@ TLSVerifyClient off
|
||||
#TLSRequired on
|
||||
|
||||
# Allow SSL/TLS renegotiations when the client requests them, but
|
||||
# do not force the renegotations. Some clients do not support
|
||||
# do not force the renegotiations. Some clients do not support
|
||||
# SSL/TLS renegotiations; when mod_tls forces a renegotiation, these
|
||||
# clients will close the data connection, or there will be a timeout
|
||||
# on an idle data connection.
|
||||
@@ -4595,7 +4595,7 @@ aliases: files
|
||||
chmod="0644">
|
||||
<content><![CDATA[
|
||||
#
|
||||
# Froxlor logrotate snipet
|
||||
# Froxlor logrotate snippet
|
||||
#
|
||||
<CUSTOMER_LOGS>*.log {
|
||||
missingok
|
||||
|
||||
@@ -37,7 +37,7 @@ return array(
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
\Froxlor\Settings::Get('system.createstdsubdom_default')
|
||||
)
|
||||
),
|
||||
'store_defaultindex' => array(
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Froxlor\Settings;
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
@@ -22,6 +24,11 @@ return array(
|
||||
'title' => $lng['mysql']['database_create'],
|
||||
'image' => 'icons/mysql_add.png',
|
||||
'fields' => array(
|
||||
'custom_suffix' => array(
|
||||
'visible' => (strtoupper(Settings::Get('customer.mysqlprefix')) == 'DBNAME') ? true : false,
|
||||
'label' => $lng['mysql']['databasename'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'description' => array(
|
||||
'label' => $lng['mysql']['databasedescription'],
|
||||
'type' => 'text'
|
||||
|
||||
24
lib/init.php
24
lib/init.php
@@ -265,7 +265,7 @@ if (isset($s) && $s != "" && $nosession != 1) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Language Managament
|
||||
* Language Management
|
||||
*/
|
||||
$langs = array();
|
||||
$languages = array();
|
||||
@@ -279,7 +279,7 @@ while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$langs[$row['language']][] = $row;
|
||||
// check for row[iso] cause older froxlor
|
||||
// versions didn't have that and it will
|
||||
// lead to a lot of undfined variables
|
||||
// lead to a lot of undefined variables
|
||||
// before the admin can even update
|
||||
if (isset($row['iso'])) {
|
||||
$iso[$row['iso']] = $row['language'];
|
||||
@@ -380,8 +380,24 @@ if (! array_key_exists('variants', $_themeoptions) || ! array_key_exists($themev
|
||||
|
||||
// check for custom header-graphic
|
||||
$hl_path = 'templates/' . $theme . '/assets/img';
|
||||
$header_logo = Settings::Get('panel.logo_image_header') ?: $hl_path . '/logo.png';
|
||||
$header_logo_login = Settings::Get('panel.logo_image_login') ?: $hl_path . '/logo.png';
|
||||
|
||||
// default is theme-image
|
||||
$header_logo = $hl_path . '/logo.png';
|
||||
$header_logo_login = $hl_path . '/logo.png';
|
||||
|
||||
if (Settings::Get('panel.logo_overridetheme') == 1 || Settings::Get('panel.logo_overridecustom') == 1) {
|
||||
// logo settings shall overwrite theme logo and possible custom logo
|
||||
$header_logo = Settings::Get('panel.logo_image_header') ?: $header_logo;
|
||||
$header_logo_login = Settings::Get('panel.logo_image_login') ?: $header_logo_login;
|
||||
}
|
||||
if (Settings::Get('panel.logo_overridecustom') == 0 && file_exists($hl_path . '/logo_custom.png')) {
|
||||
// custom theme image (logo_custom.png) is not being overwritten by logo_image_* setting
|
||||
$header_logo = $hl_path . '/logo_custom.png';
|
||||
$header_logo_login = $hl_path . '/logo_custom.png';
|
||||
if (file_exists($hl_path . '/logo_custom_login.png')) {
|
||||
$header_logo_login = $hl_path . '/logo_custom_login.png';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirects to index.php (login page) if no session exists
|
||||
|
||||
2096
lng/czech.lng.php
Normal file
2096
lng/czech.lng.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -558,10 +558,6 @@ $lng['traffic']['sumhttp'] = 'Samenvatting HTTP-verkeer in';
|
||||
$lng['traffic']['sumftp'] = 'Samenvatting FTP-verkeer in';
|
||||
$lng['traffic']['summail'] = 'Samenvatting Mail-verkeer in';
|
||||
|
||||
// ADDED IN 1.2.19-svn4.5
|
||||
|
||||
$lng['serversettings']['no_robots']['title'] = 'Zoekmachines toestaan uw Froxlor-installatie te indexeren';
|
||||
|
||||
// ADDED IN 1.2.19-svn6
|
||||
|
||||
$lng['admin']['loggersettings'] = 'Instellingen voor logs';
|
||||
@@ -591,7 +587,7 @@ $lng['panel']['reseller'] = 'wederverkoper';
|
||||
$lng['panel']['admin'] = 'beheerder';
|
||||
$lng['panel']['customer'] = 'klant(en)';
|
||||
$lng['error']['nomessagetosend'] = 'U hebt geen bericht opgegeven.';
|
||||
$lng['error']['noreceipientsgiven'] = 'U hebt geen ontvanger opgegeven';
|
||||
$lng['error']['norecipientsgiven'] = 'U hebt geen ontvanger opgegeven';
|
||||
$lng['admin']['emaildomain'] = 'Emaildomein';
|
||||
$lng['admin']['email_only'] = 'Alleen email?';
|
||||
$lng['admin']['wwwserveralias'] = 'Voeg een "www." ServerAlias toe';
|
||||
@@ -599,14 +595,14 @@ $lng['admin']['ipsandports']['enable_ssl'] = 'Is dit een SSL-poort?';
|
||||
$lng['admin']['ipsandports']['ssl_cert_file'] = 'Pad naar SSL-certificaat';
|
||||
$lng['panel']['send'] = 'verzenden';
|
||||
$lng['admin']['subject'] = 'Onderwerp';
|
||||
$lng['admin']['receipient'] = 'Ontvanger';
|
||||
$lng['admin']['recipient'] = 'Ontvanger';
|
||||
$lng['admin']['message'] = 'Bericht schrijven';
|
||||
$lng['admin']['text'] = 'Bericht';
|
||||
$lng['menu']['message'] = 'Berichten';
|
||||
$lng['error']['errorsendingmail'] = 'Het versturen van het bericht naar "%s" is mislukt';
|
||||
$lng['error']['cannotreaddir'] = 'De map "%s" kan niet gelezen worden';
|
||||
$lng['message']['success'] = 'Bericht verzonden naar ontvangers %s';
|
||||
$lng['message']['noreceipients'] = 'Er is geen email verstuurd omdat er geen ontvangers in de database zijn';
|
||||
$lng['message']['norecipients'] = 'Er is geen email verstuurd omdat er geen ontvangers in de database zijn';
|
||||
$lng['admin']['sslsettings'] = 'Instellingen voor SSL';
|
||||
$lng['cronjobs']['notyetrun'] = 'Nog niet uitgevoerd';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Standaard vhost-instellingen';
|
||||
|
||||
@@ -332,7 +332,7 @@ $lng['serversettings']['session_timeout']['description'] = 'How long does a user
|
||||
$lng['serversettings']['accountprefix']['title'] = 'Customer prefix';
|
||||
$lng['serversettings']['accountprefix']['description'] = 'Which prefix should customer accounts have?';
|
||||
$lng['serversettings']['mysqlprefix']['title'] = 'SQL Prefix';
|
||||
$lng['serversettings']['mysqlprefix']['description'] = 'Which prefix should MySQL accounts have?</br>Use "RANDOM" as value to get a 3-digit random prefix';
|
||||
$lng['serversettings']['mysqlprefix']['description'] = 'Which prefix should MySQL accounts have?</br>Use "RANDOM" as value to get a 3-digit random prefix</br>Use "DBNAME" as the value, a database name field is used together with the customer name as a prefix.';
|
||||
$lng['serversettings']['ftpprefix']['title'] = 'FTP Prefix';
|
||||
$lng['serversettings']['ftpprefix']['description'] = 'Which prefix should ftp accounts have?<br/><b>If you change this you also have to change the Quota SQL Query in your FTP Server config file in case you use it!</b> ';
|
||||
$lng['serversettings']['documentroot_prefix']['title'] = 'Home directory';
|
||||
@@ -626,10 +626,6 @@ $lng['traffic']['sumhttp'] = 'Total HTTP-Traffic';
|
||||
$lng['traffic']['sumftp'] = 'Total FTP-Traffic';
|
||||
$lng['traffic']['summail'] = 'Total Mail-Traffic';
|
||||
|
||||
// ADDED IN 1.2.19-svn4.5
|
||||
|
||||
$lng['serversettings']['no_robots']['title'] = 'Allow searchengine-robots to index your Froxlor installation';
|
||||
|
||||
// ADDED IN 1.2.19-svn6
|
||||
|
||||
$lng['admin']['loggersettings'] = 'Log settings';
|
||||
@@ -664,7 +660,7 @@ $lng['panel']['reseller'] = 'reseller';
|
||||
$lng['panel']['admin'] = 'admin';
|
||||
$lng['panel']['customer'] = 'customer/s';
|
||||
$lng['error']['nomessagetosend'] = 'You did not enter a message.';
|
||||
$lng['error']['noreceipientsgiven'] = 'You did not specify any recipient';
|
||||
$lng['error']['norecipientsgiven'] = 'You did not specify any recipient';
|
||||
$lng['admin']['emaildomain'] = 'Emaildomain';
|
||||
$lng['admin']['email_only'] = 'Only email?';
|
||||
$lng['admin']['wwwserveralias'] = 'Add a "www." ServerAlias';
|
||||
@@ -672,14 +668,14 @@ $lng['admin']['ipsandports']['enable_ssl'] = 'Is this an SSL Port?';
|
||||
$lng['admin']['ipsandports']['ssl_cert_file'] = 'Path to the SSL Certificate';
|
||||
$lng['panel']['send'] = 'send';
|
||||
$lng['admin']['subject'] = 'Subject';
|
||||
$lng['admin']['receipient'] = 'Recipient';
|
||||
$lng['admin']['recipient'] = 'Recipient';
|
||||
$lng['admin']['message'] = 'Write a Message';
|
||||
$lng['admin']['text'] = 'Message';
|
||||
$lng['menu']['message'] = 'Messages';
|
||||
$lng['error']['errorsendingmail'] = 'The message to "%s" failed';
|
||||
$lng['error']['cannotreaddir'] = 'Unable to read directory "%s"';
|
||||
$lng['message']['success'] = 'Successfully sent message to %s recipients';
|
||||
$lng['message']['noreceipients'] = 'No e-mail has been sent because there are no recipients in the database';
|
||||
$lng['message']['norecipients'] = 'No e-mail has been sent because there are no recipients in the database';
|
||||
$lng['admin']['sslsettings'] = 'SSL settings';
|
||||
$lng['cronjobs']['notyetrun'] = 'Not yet run';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Default vHost-settings';
|
||||
@@ -930,7 +926,7 @@ $lng['admin']['ipsandports']['default_vhostconf_domain'] = 'Default vHost-settin
|
||||
$lng['serversettings']['ssl']['ssl_key_file']['title'] = 'Path to the SSL Keyfile';
|
||||
$lng['serversettings']['ssl']['ssl_key_file']['description'] = 'Specify the path including the filename for the private-key file (.key mostly)';
|
||||
$lng['serversettings']['ssl']['ssl_ca_file']['title'] = 'Path to the SSL CA certificate (optional)';
|
||||
$lng['serversettings']['ssl']['ssl_ca_file']['description'] = 'Client authentification, set this only if you know what it is.';
|
||||
$lng['serversettings']['ssl']['ssl_ca_file']['description'] = 'Client authentication, set this only if you know what it is.';
|
||||
|
||||
$lng['error']['usernamealreadyexists'] = 'The username %s already exists.';
|
||||
|
||||
@@ -1600,12 +1596,14 @@ $lng['serversettings']['panel_allow_theme_change_admin'] = 'Allow admins to chan
|
||||
$lng['serversettings']['panel_allow_theme_change_customer'] = 'Allow customers to change the theme';
|
||||
$lng['serversettings']['axfrservers']['title'] = 'AXFR servers';
|
||||
$lng['serversettings']['axfrservers']['description'] = 'A comma separated list of IP addresses allowed to transfer (AXFR) dns zones.';
|
||||
$lng['serversettings']['powerdns_mode']['title'] = 'PowerDNS Operation Mode';
|
||||
$lng['serversettings']['powerdns_mode']['description'] = 'Select the PoweDNS mode: Native for no replication (Default) / Master if DNS replication is needed.';
|
||||
$lng['panel']['ssleditor'] = 'SSL settings for this domain';
|
||||
$lng['admin']['ipsandports']['ssl_paste_description'] = 'Paste your complete certificate content in the textbox';
|
||||
$lng['admin']['ipsandports']['ssl_cert_file_content'] = 'Content of the ssl certificate';
|
||||
$lng['admin']['ipsandports']['ssl_key_file_content'] = 'Content of the ssl (private-) key file';
|
||||
$lng['admin']['ipsandports']['ssl_ca_file_content'] = 'Content of the ssl CA file (optional)';
|
||||
$lng['admin']['ipsandports']['ssl_ca_file_content_desc'] = '<br /><br />Client authentification, set this only if you know what it is.';
|
||||
$lng['admin']['ipsandports']['ssl_ca_file_content_desc'] = '<br /><br />Client authentication, set this only if you know what it is.';
|
||||
$lng['admin']['ipsandports']['ssl_cert_chainfile_content'] = 'Content of the certificate chain file (optional)';
|
||||
$lng['admin']['ipsandports']['ssl_cert_chainfile_content_desc'] = '<br /><br />Mostly CA_Bundle, or similar, you probably want to set this if you bought a SSL certificate.';
|
||||
$lng['error']['sslcertificateismissingprivatekey'] = 'You need to specify a private key for your certificate';
|
||||
@@ -1615,7 +1613,7 @@ $lng['error']['sslcertificateinvalidcertkeypair'] = 'The given private-key does
|
||||
$lng['error']['sslcertificateinvalidca'] = 'The given CA certificate data does not seem to be a valid certificate';
|
||||
$lng['error']['sslcertificateinvalidchain'] = 'The given certificate chain data does not seem to be a valid certificate';
|
||||
$lng['serversettings']['customerssl_directory']['title'] = 'Webserver customer-ssl certificates-directory';
|
||||
$lng['serversettings']['customerssl_directory']['description'] = 'Where should customer-specified ssl-certificates be created?<br /><br /><div class="red">NOTE: This folder\'s content gets deleted regulary so avoid storing data in there manually.</div>';
|
||||
$lng['serversettings']['customerssl_directory']['description'] = 'Where should customer-specified ssl-certificates be created?<br /><br /><div class="red">NOTE: This folder\'s content gets deleted regularly so avoid storing data in there manually.</div>';
|
||||
$lng['admin']['phpfpm.ininote'] = 'Not all values you may want to define can be used in the php-fpm pool configuration';
|
||||
|
||||
// Added in Froxlor 0.9.30
|
||||
@@ -1922,7 +1920,7 @@ $lng['dnseditor']['records'] = 'records';
|
||||
$lng['error']['dns_notfoundorallowed'] = 'Domain not found or no permission';
|
||||
$lng['serversettings']['dnseditorenable']['title'] = 'Enable DNS editor';
|
||||
$lng['serversettings']['dnseditorenable']['description'] = 'Allows admins and customer to manage domain dns entries';
|
||||
$lng['dns']['howitworks'] = 'Here you can manage DNS entries for your domain. Note that froxlor will automatically generate NS/MX/A/AAAA records for you. The custom entries are prefered, only missing entries will be automatically generated.';
|
||||
$lng['dns']['howitworks'] = 'Here you can manage DNS entries for your domain. Note that froxlor will automatically generate NS/MX/A/AAAA records for you. The custom entries are preferred, only missing entries will be automatically generated.';
|
||||
$lng['serversettings']['dns_server']['title'] = 'DNS server daemon';
|
||||
$lng['serversettings']['dns_server']['description'] = 'Remember that daemons have to be configured using froxlors configuration templates';
|
||||
|
||||
@@ -1997,7 +1995,7 @@ $lng['serversettings']['leapiversion']['title'] = "Choose Let's Encrypt ACME imp
|
||||
$lng['serversettings']['leapiversion']['description'] = "Currently only ACME v2 implementation for Let's Encrypt is supported.";
|
||||
$lng['admin']['phpsettings']['pass_authorizationheader'] = 'Add "-pass-header Authorization" / "CGIPassAuth On" to vhosts';
|
||||
$lng['serversettings']['ssl']['ssl_protocols']['title'] = 'Configure the TLS protocol version';
|
||||
$lng['serversettings']['ssl']['ssl_protocols']['description'] = 'This is a list of ssl protocols that you want (or don\'t want) to use when using SSL. <b>Notice:</b> Some older browsers may not support the newest protcol versions.<br /><br /><b>Default value is:</b><pre>TLSv1.2</pre>';
|
||||
$lng['serversettings']['ssl']['ssl_protocols']['description'] = 'This is a list of ssl protocols that you want (or don\'t want) to use when using SSL. <b>Notice:</b> Some older browsers may not support the newest protocol versions.<br /><br /><b>Default value is:</b><pre>TLSv1.2</pre>';
|
||||
$lng['serversettings']['phpfpm_settings']['limit_extensions']['title'] = 'Allowed extensions';
|
||||
$lng['serversettings']['phpfpm_settings']['limit_extensions']['description'] = 'Limits the extensions of the main script FPM will allow to parse. This can prevent configuration mistakes on the web server side. You should only limit FPM to .php extensions to prevent malicious users to use other extensions to execute php code. Default value: .php';
|
||||
$lng['phpfpm']['ini_flags'] = 'Enter possible <strong>php_flag</strong>s for php.ini. One entry per line';
|
||||
@@ -2123,3 +2121,13 @@ $lng['serversettings']['logo_image_header']['description'] = 'Upload your own lo
|
||||
$lng['serversettings']['logo_image_login']['title'] = 'Logo Image (Login)';
|
||||
$lng['serversettings']['logo_image_login']['description'] = 'Upload your own logo image to be shown during login';
|
||||
$lng['panel']['image_field_delete'] = 'Delete the existing current image';
|
||||
$lng['serversettings']['logo_overridetheme']['title'] = 'Overwrites logo defined in theme by "Logo Image" (Header and Login, see below)';
|
||||
$lng['serversettings']['logo_overridetheme']['description'] = 'This needs to be set to "true" if you intend to use your uploaded logo; alternatively you can still use the theme-based "logo_custom.png" and "logo_custom_login.png" possibility.';
|
||||
$lng['serversettings']['logo_overridecustom']['title'] = 'Overwrite custom logo (logo_custom.png and logo_custom_login.png) defined in theme by "Logo Image" (Header and Login, see below)';
|
||||
$lng['serversettings']['logo_overridecustom']['description'] = 'Set this to "true" if you want to ignore theme-specific custom logos for header and login and use "Logo Image"';
|
||||
$lng['serversettings']['createstdsubdom_default']['title'] = 'Preselected value for "'.$lng['admin']['stdsubdomain_add'].'" when creating a customer';
|
||||
$lng['serversettings']['froxlorusergroup']['title'] = 'Custom system group for all customer users';
|
||||
$lng['serversettings']['froxlorusergroup']['description'] = 'Usage of libnss-extrausers (system-settings) is required for this to take effect. An empty value skips creation or removes existing group.';
|
||||
$lng['error']['local_group_exists'] = 'The given group already exists on the system.';
|
||||
$lng['error']['local_group_invalid'] = 'The given group name is invalid';
|
||||
$lng['error']['invaliddnsforletsencrypt'] = 'The domains DNS does not include any of the chosen IP addresses. Let\'s Encrypt certificate generation not possible.';
|
||||
|
||||
@@ -598,10 +598,6 @@ $lng['traffic']['sumhttp'] = 'Trafic HTTP total entrant';
|
||||
$lng['traffic']['sumftp'] = 'Trafic FTP total entrant';
|
||||
$lng['traffic']['summail'] = 'Trafic E-mail total entrant';
|
||||
|
||||
// ADDED IN 1.2.19-svn4.5
|
||||
|
||||
$lng['serversettings']['no_robots']['title'] = 'Permettre aux robots des moteurs de recherche d\'indexer l\'installation de Froxlor';
|
||||
|
||||
// ADDED IN 1.2.19-svn6
|
||||
|
||||
$lng['admin']['loggersettings'] = 'Paramètres des logs';
|
||||
@@ -631,7 +627,7 @@ $lng['panel']['reseller'] = 'revendeur';
|
||||
$lng['panel']['admin'] = 'administrateur';
|
||||
$lng['panel']['customer'] = 'client(s)';
|
||||
$lng['error']['nomessagetosend'] = 'Vous n\'avez pas entré de message.';
|
||||
$lng['error']['noreceipientsgiven'] = 'Vous n\'avez pas spécifier de destinataire';
|
||||
$lng['error']['norecipientsgiven'] = 'Vous n\'avez pas spécifier de destinataire';
|
||||
$lng['admin']['emaildomain'] = 'Domaine e-mail';
|
||||
$lng['admin']['email_only'] = 'Seulement des e-mails ?';
|
||||
$lng['admin']['wwwserveralias'] = 'Ajouter un "www." à l\'alias du serveur "ServerAlias"';
|
||||
@@ -639,14 +635,14 @@ $lng['admin']['ipsandports']['enable_ssl'] = 'Est-ce un port SSL ?';
|
||||
$lng['admin']['ipsandports']['ssl_cert_file'] = 'Emplacement du certificat SSL';
|
||||
$lng['panel']['send'] = 'envoyé';
|
||||
$lng['admin']['subject'] = 'Sujet';
|
||||
$lng['admin']['receipient'] = 'Destinataire';
|
||||
$lng['admin']['recipient'] = 'Destinataire';
|
||||
$lng['admin']['message'] = 'Ecrire un message';
|
||||
$lng['admin']['text'] = 'Message';
|
||||
$lng['menu']['message'] = 'Messages';
|
||||
$lng['error']['errorsendingmail'] = 'Echec d\'envoi du message à "%s"';
|
||||
$lng['error']['cannotreaddir'] = 'Impossible de lire dossier "%s"';
|
||||
$lng['message']['success'] = 'Le message a été envoyé aux destinataires "%s"';
|
||||
$lng['message']['noreceipients'] = 'Aucun e-mail n\'a été envoyé car il n\'existe aucun destinataire dans la base de données';
|
||||
$lng['message']['norecipients'] = 'Aucun e-mail n\'a été envoyé car il n\'existe aucun destinataire dans la base de données';
|
||||
$lng['admin']['sslsettings'] = 'Paramètres SSL';
|
||||
$lng['cronjobs']['notyetrun'] = 'Pas encore lancé';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Paramètres par défaut pour les vHosts';
|
||||
|
||||
@@ -327,7 +327,7 @@ $lng['serversettings']['session_timeout']['description'] = 'Wie lange muss ein B
|
||||
$lng['serversettings']['accountprefix']['title'] = 'Kundenpräfix';
|
||||
$lng['serversettings']['accountprefix']['description'] = 'Welchen Präfix sollen die Kundenaccounts haben?';
|
||||
$lng['serversettings']['mysqlprefix']['title'] = 'MySQL-Präfix';
|
||||
$lng['serversettings']['mysqlprefix']['description'] = 'Welchen Präfix sollen die MySQL-Benutzerkonten haben?</br>Mit "RANDOM" als Wert wird ein 3-stelliger Zufallswert als Präfix verwendet.';
|
||||
$lng['serversettings']['mysqlprefix']['description'] = 'Welchen Präfix sollen die MySQL-Benutzerkonten haben?</br>Mit "RANDOM" als Wert wird ein 3-stelliger Zufallswert als Präfix verwendet.</br>Mit "DBNAME" als Wert wird ein Feld Databankname zusammen mit dem Kundennamen als Präfix genutzt.';
|
||||
$lng['serversettings']['ftpprefix']['title'] = 'FTP-Präfix';
|
||||
$lng['serversettings']['ftpprefix']['description'] = 'Welchen Präfix sollen die FTP-Benutzerkonten haben?<br/><b>Falls FTP-Quoatas verwendet werden, ist es notwendig das Quota-SQL-Query in der FTP-Server-Config ebenfalls zu ändern!</b>';
|
||||
$lng['serversettings']['documentroot_prefix']['title'] = 'Heimatverzeichnis';
|
||||
@@ -619,10 +619,6 @@ $lng['traffic']['sumhttp'] = 'Gesamt HTTP-Traffic';
|
||||
$lng['traffic']['sumftp'] = 'Gesamt FTP-Traffic';
|
||||
$lng['traffic']['summail'] = 'Gesamt Mail-Traffic';
|
||||
|
||||
// ADDED IN 1.2.19-svn4.5
|
||||
|
||||
$lng['serversettings']['no_robots']['title'] = 'Erlaube die Indizierung Ihrer Froxlor-Installation durch Suchmaschinen';
|
||||
|
||||
// ADDED IN 1.2.19-svn6
|
||||
|
||||
$lng['admin']['loggersettings'] = 'Log-Einstellungen';
|
||||
@@ -657,7 +653,7 @@ $lng['panel']['reseller'] = 'Reseller';
|
||||
$lng['panel']['admin'] = 'Administrator';
|
||||
$lng['panel']['customer'] = 'Kunde/n';
|
||||
$lng['error']['nomessagetosend'] = 'Keine Nachricht angegeben';
|
||||
$lng['error']['noreceipientsgiven'] = 'Keine Empfänger angegeben';
|
||||
$lng['error']['norecipientsgiven'] = 'Keine Empfänger angegeben';
|
||||
$lng['admin']['emaildomain'] = 'E-Mail-Domain';
|
||||
$lng['admin']['email_only'] = 'Nur als E-Mail-Domain verwenden?';
|
||||
$lng['admin']['wwwserveralias'] = 'Einen "www." ServerAlias hinzufügen';
|
||||
@@ -665,14 +661,14 @@ $lng['admin']['ipsandports']['enable_ssl'] = 'Ist dies ein SSL-Port?';
|
||||
$lng['admin']['ipsandports']['ssl_cert_file'] = 'Pfad zum Zertifikat';
|
||||
$lng['panel']['send'] = 'Versenden';
|
||||
$lng['admin']['subject'] = 'Betreff';
|
||||
$lng['admin']['receipient'] = 'Empfänger';
|
||||
$lng['admin']['recipient'] = 'Empfänger';
|
||||
$lng['admin']['message'] = 'Rundmail senden';
|
||||
$lng['admin']['text'] = 'Nachricht';
|
||||
$lng['menu']['message'] = 'Nachrichten';
|
||||
$lng['error']['errorsendingmail'] = 'Das Versenden der Nachricht an "%s" schlug fehl.';
|
||||
$lng['error']['cannotreaddir'] = 'Der Ordner "%s" kann nicht gelesen werden';
|
||||
$lng['message']['success'] = 'Nachricht erfolgreich an "%s" Empfänger gesendet';
|
||||
$lng['message']['noreceipients'] = 'Es wurde keine E-Mail versendet, da sich keine Empfänger in der Datenbank befinden';
|
||||
$lng['message']['norecipients'] = 'Es wurde keine E-Mail versendet, da sich keine Empfänger in der Datenbank befinden';
|
||||
$lng['admin']['sslsettings'] = 'SSL-Einstellungen';
|
||||
$lng['cronjobs']['notyetrun'] = 'Bisher nicht gestartet';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Standard vHost-Einstellungen';
|
||||
@@ -1324,6 +1320,8 @@ $lng['serversettings']['panel_allow_theme_change_admin'] = 'Erlaube Admins das T
|
||||
$lng['serversettings']['panel_allow_theme_change_customer'] = 'Erlaube Kunden das Theme zu wechseln';
|
||||
$lng['serversettings']['axfrservers']['title'] = 'AXFR Server';
|
||||
$lng['serversettings']['axfrservers']['description'] = 'Eine durch Kommas getrennte Liste von IP Adressen, die DNS-Zonen transferieren dürfen (AXFR).';
|
||||
$lng['serversettings']['powerdns_mode']['title'] = 'PowerDNS Operation Mode';
|
||||
$lng['serversettings']['powerdns_mode']['description'] = 'Wählen Sie den PowerDNS-Modus: Native für keine DNS-Replikation (Standard) / Master wenn eine DNS-Replikation benötigt wird.';
|
||||
$lng['panel']['ssleditor'] = 'SSL-Einstellungen für diese Domain';
|
||||
$lng['admin']['ipsandports']['ssl_paste_description'] = 'Bitte den Inhalt der Zertifikatsdatei in das Textfeld kopieren.';
|
||||
$lng['admin']['ipsandports']['ssl_cert_file_content'] = 'Inhalt des SSL-Zertifikats (Certificate)';
|
||||
@@ -1769,3 +1767,13 @@ $lng['serversettings']['logo_image_header']['description'] = 'Das hochgeladene B
|
||||
$lng['serversettings']['logo_image_login']['title'] = 'Logo Bild (Login)';
|
||||
$lng['serversettings']['logo_image_login']['description'] = 'Das hochgeladene Bild wird als Logo während des Logins angezeigt';
|
||||
$lng['panel']['image_field_delete'] = 'Das momentan vorhandene Bild löschen';
|
||||
$lng['serversettings']['logo_overridetheme']['title'] = 'Überschreibe Theme-Logo mit "Logo Bild" (Header und Login, siehe unten)';
|
||||
$lng['serversettings']['logo_overridetheme']['description'] = 'Ist die Nutzung eines hochgeladenen Logos gewünscht, muss diese Einstellung auf "Ja" gesetzt werden. Alternativ kann weiterhin das Theme-basierte Überschreiben via "logo_custom.png" und "logo_custom_login.png" genutzt werden.';
|
||||
$lng['serversettings']['logo_overridecustom']['title'] = 'Überschreibe benutzerdefinierte Theme-Logos (logo_custom.png und logo_custom_login.png) mit "Logo Bold" (Header und Login, siehe unten)';
|
||||
$lng['serversettings']['logo_overridecustom']['description'] = 'Ist diese Einstellung aktiv, werden benutzerdefinierte Logos im Theme-Ordner mit dem "Logo Bild" ersetzt';
|
||||
$lng['serversettings']['createstdsubdom_default']['title'] = 'Standardwert für "'.$lng['admin']['stdsubdomain_add'].'" bei Erstellung eines Kunden';
|
||||
$lng['serversettings']['froxlorusergroup']['title'] = 'Benutzerdefinierte Gruppe für alle Kunden-Benutzer';
|
||||
$lng['serversettings']['froxlorusergroup']['description'] = 'Voraussetzung hierfür ist die Nutzung von libnss-extrausers (System-Einstellungen). Ein leerer Wert bedeutet, es wird keine Gruppe erstellt, bzw. vorhandene Gruppe wird entfernt.';
|
||||
$lng['error']['local_group_exists'] = 'Die angegebene Gruppe existiert bereits auf dem System';
|
||||
$lng['error']['local_group_invalid'] = 'Der angegebene Gruppen-Name ist nicht gültig';
|
||||
$lng['error']['invaliddnsforletsencrypt'] = 'Die DNS-Einträge der Domain enhalten keine der gewählten IP Adressen. Let\'s Encrypt Zertifikats-Erstellung ist nicht möglich.';
|
||||
|
||||
@@ -584,10 +584,6 @@ $lng['traffic']['sumhttp'] = 'Sommatoria Traffico in ingresso HTTP';
|
||||
$lng['traffic']['sumftp'] = 'Sommatoria Traffico in ingresso FTP';
|
||||
$lng['traffic']['summail'] = 'Sommatoria Traffico in ingresso Mail';
|
||||
|
||||
// ADDED IN 1.2.19-svn4.5
|
||||
|
||||
$lng['serversettings']['no_robots']['title'] = 'Permetti ai robot dei motori di ricerca di indicizzare l\'installazione di Froxlor';
|
||||
|
||||
// ADDED IN 1.2.19-svn6
|
||||
|
||||
$lng['admin']['loggersettings'] = 'Impostazioni Log';
|
||||
@@ -614,7 +610,7 @@ $lng['panel']['reseller'] = 'rivenditore';
|
||||
$lng['panel']['admin'] = 'amministratore';
|
||||
$lng['panel']['customer'] = 'cliente/i';
|
||||
$lng['error']['nomessagetosend'] = 'Non hai inserito un messaggio.';
|
||||
$lng['error']['noreceipientsgiven'] = 'Non hai specificato alcun destinatario';
|
||||
$lng['error']['norecipientsgiven'] = 'Non hai specificato alcun destinatario';
|
||||
$lng['admin']['emaildomain'] = 'Email dominio';
|
||||
$lng['admin']['email_only'] = 'Solo email?';
|
||||
$lng['admin']['wwwserveralias'] = 'Aggiungi a "www." ServerAlias';
|
||||
@@ -622,14 +618,14 @@ $lng['admin']['ipsandports']['enable_ssl'] = 'Questa è una porta SSL?';
|
||||
$lng['admin']['ipsandports']['ssl_cert_file'] = 'Percorso del certificato SSL (SSL certificate)';
|
||||
$lng['panel']['send'] = 'invia';
|
||||
$lng['admin']['subject'] = 'Oggetto';
|
||||
$lng['admin']['receipient'] = 'Destinatario';
|
||||
$lng['admin']['recipient'] = 'Destinatario';
|
||||
$lng['admin']['message'] = 'Scrivi un messaggio';
|
||||
$lng['admin']['text'] = 'Messaggio';
|
||||
$lng['menu']['message'] = 'Messaggi';
|
||||
$lng['error']['errorsendingmail'] = 'Il messaggio a "%s" fallito';
|
||||
$lng['error']['cannotreaddir'] = 'Impossibile leggere la cartella "%s"';
|
||||
$lng['message']['success'] = 'Inviato correttamente il messaggio a %s recipients';
|
||||
$lng['message']['noreceipients'] = 'Nessuna e-mail è stata inviata perch¸ non ci sono i destinatari nel database';
|
||||
$lng['message']['norecipients'] = 'Nessuna e-mail è stata inviata perch¸ non ci sono i destinatari nel database';
|
||||
$lng['admin']['sslsettings'] = 'Impostazioni SSL';
|
||||
$lng['cronjobs']['notyetrun'] = 'Non ancora avviato';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Impostazioni default vhost';
|
||||
|
||||
@@ -529,7 +529,6 @@ $lng['traffic']['distribution'] = '<font color="#019522">FTP</font> | <font colo
|
||||
$lng['traffic']['sumhttp'] = 'Resumo Tráfego de HTTP em';
|
||||
$lng['traffic']['sumftp'] = 'Resumo Tráfego de FTP em';
|
||||
$lng['traffic']['summail'] = 'Resumo Tráfego de HTTP em';
|
||||
$lng['serversettings']['no_robots']['title'] = 'Aceitar robôs de procura na index de seuFroxlor';
|
||||
$lng['admin']['loggersettings'] = 'Configurações de Logs';
|
||||
$lng['serversettings']['logger']['enable'] = 'Habilitar/Desabilitar Logs';
|
||||
$lng['serversettings']['logger']['severity'] = 'Nível de Logs';
|
||||
@@ -555,7 +554,7 @@ $lng['panel']['reseller'] = 'Revenda';
|
||||
$lng['panel']['admin'] = 'Administrador';
|
||||
$lng['panel']['customer'] = 'Cliente(s)';
|
||||
$lng['error']['nomessagetosend'] = 'Você não entrou com uma mensagem';
|
||||
$lng['error']['noreceipientsgiven'] = 'Você não especificou um destinatário';
|
||||
$lng['error']['norecipientsgiven'] = 'Você não especificou um destinatário';
|
||||
$lng['admin']['emaildomain'] = 'Domínio de Email';
|
||||
$lng['admin']['email_only'] = 'Somente Email?';
|
||||
$lng['admin']['wwwserveralias'] = 'Adicionar um "www." ServerAlias';
|
||||
@@ -563,14 +562,14 @@ $lng['admin']['ipsandports']['enable_ssl'] = 'Esta é uma porta SSL?';
|
||||
$lng['admin']['ipsandports']['ssl_cert_file'] = 'Caminho para o certificado SSL';
|
||||
$lng['panel']['send'] = 'Enviar';
|
||||
$lng['admin']['subject'] = 'Assunto';
|
||||
$lng['admin']['receipient'] = 'Destinatário';
|
||||
$lng['admin']['recipient'] = 'Destinatário';
|
||||
$lng['admin']['message'] = 'Escrever uma mensagem';
|
||||
$lng['admin']['text'] = 'Mensagem';
|
||||
$lng['menu']['message'] = 'Mensagens';
|
||||
$lng['error']['errorsendingmail'] = 'A mensagem para "%s" falhou';
|
||||
$lng['error']['cannotreaddir'] = 'Não é possível ler o diretório "%s"';
|
||||
$lng['message']['success'] = 'Mensagens enviadas para %s destinatários com sucesso';
|
||||
$lng['message']['noreceipients'] = 'Email não enviado porque não tem destinatário no banco de dados';
|
||||
$lng['message']['norecipients'] = 'Email não enviado porque não tem destinatário no banco de dados';
|
||||
$lng['admin']['sslsettings'] = 'Configuração de SSL';
|
||||
$lng['cronjobs']['notyetrun'] = 'Ainda não está rodando';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Configuração de Vhost padrão';
|
||||
|
||||
4
templates/Sparkle/admin/message/message.tpl
vendored
4
templates/Sparkle/admin/message/message.tpl
vendored
@@ -23,8 +23,8 @@ $header
|
||||
|
||||
<table class="full">
|
||||
<tr>
|
||||
<td><b><label for="receipient">{$lng['admin']['receipient']}</label></b></td>
|
||||
<td><select name="receipient" id="receipient">$receipients</select></td>
|
||||
<td><b><label for="recipient">{$lng['admin']['recipient']}</label></b></td>
|
||||
<td><select name="recipient" id="recipient">$recipients</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><label for="subject">{$lng['admin']['subject']}</label></b></td>
|
||||
|
||||
6
templates/Sparkle/assets/js/circular.js
vendored
6
templates/Sparkle/assets/js/circular.js
vendored
@@ -56,7 +56,7 @@ $(document).ready(function() {
|
||||
|
||||
// Draw percentages
|
||||
if (!isNaN(assigned) && available == "∞") {
|
||||
// Unlimited ressource and assigned
|
||||
// Unlimited resource and assigned
|
||||
if (assigned > used) {
|
||||
// Draw assigned as full circle
|
||||
circularCircle(canvas, 38, 0, 270, 4, assiColor);
|
||||
@@ -77,7 +77,7 @@ $(document).ready(function() {
|
||||
}
|
||||
circularText(canvas, 60, 42, 26, "∞");
|
||||
} else if (!isNaN(assigned)) {
|
||||
// Limited ressources but assigned
|
||||
// Limited resources but assigned
|
||||
available = parseFloat(available);
|
||||
|
||||
assignedP = Math.round(100 / available * assigned);
|
||||
@@ -92,7 +92,7 @@ $(document).ready(function() {
|
||||
circularCircle(canvas, 40, 0, 270, 8, unliColor);
|
||||
circularText(canvas, 60, 42, 26, "∞");
|
||||
} else {
|
||||
// Limited ressources
|
||||
// Limited resources
|
||||
available = parseFloat(available);
|
||||
usedP = 100 / available * used;
|
||||
if (usedP < 1 && usedP > 0) {
|
||||
|
||||
2
templates/Sparkle/header.tpl
vendored
2
templates/Sparkle/header.tpl
vendored
@@ -3,10 +3,8 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="Default-Style" content="text/css" />
|
||||
<if \Froxlor\Settings::Get('panel.no_robots') == '0'>
|
||||
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||
<meta name="GOOGLEBOT" content="nosnippet" />
|
||||
</if>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
|
||||
|
||||
@@ -4,6 +4,7 @@ use PHPUnit\Framework\TestCase;
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\Certificates;
|
||||
use Froxlor\Api\Commands\SubDomains;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -18,6 +19,12 @@ class CertificatesTest extends TestCase
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
$json_result = SubDomains::getLocal($admin_userdata, array(
|
||||
'domainname' => 'test2.local'
|
||||
))->get();
|
||||
$domain = json_decode($json_result, true)['data'];
|
||||
$domainid = $domain['id'];
|
||||
|
||||
$certdata = $this->generateKey();
|
||||
$json_result = Certificates::getLocal($admin_userdata, array(
|
||||
'domainname' => 'test2.local',
|
||||
@@ -25,7 +32,7 @@ class CertificatesTest extends TestCase
|
||||
'ssl_key_file' => $certdata['key']
|
||||
))->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(3, $result['domainid']);
|
||||
$this->assertEquals($domainid, $result['domainid']);
|
||||
}
|
||||
|
||||
public function testResellerCertificatesAddAgain()
|
||||
@@ -57,6 +64,12 @@ class CertificatesTest extends TestCase
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
$json_result = SubDomains::getLocal($admin_userdata, array(
|
||||
'domainname' => 'mysub2.test2.local'
|
||||
))->get();
|
||||
$domain = json_decode($json_result, true)['data'];
|
||||
$domainid = $domain['id'];
|
||||
|
||||
$certdata = $this->generateKey();
|
||||
$json_result = Certificates::getLocal($customer_userdata, array(
|
||||
'domainname' => 'mysub2.test2.local',
|
||||
@@ -64,7 +77,7 @@ class CertificatesTest extends TestCase
|
||||
'ssl_key_file' => $certdata['key']
|
||||
))->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(7, $result['domainid']);
|
||||
$this->assertEquals($domainid, $result['domainid']);
|
||||
}
|
||||
|
||||
public function testAdminCertificatesList()
|
||||
@@ -128,7 +141,6 @@ class CertificatesTest extends TestCase
|
||||
'ssl_key_file' => $certdata['key']
|
||||
))->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(3, $result['domainid']);
|
||||
$this->assertEquals(str_replace("\n", "", $certdata['cert']), str_replace("\n", "", $result['ssl_cert_file']));
|
||||
}
|
||||
|
||||
@@ -148,7 +160,6 @@ class CertificatesTest extends TestCase
|
||||
'ssl_key_file' => $certdata['key']
|
||||
))->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(7, $result['domainid']);
|
||||
$this->assertEquals(str_replace("\n", "", $certdata['cert']), str_replace("\n", "", $result['ssl_cert_file']));
|
||||
}
|
||||
|
||||
@@ -169,7 +180,7 @@ class CertificatesTest extends TestCase
|
||||
'id' => 1
|
||||
))->delete();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(3, $result['domainid']);
|
||||
$this->assertTrue(isset($result['domainid']) && $result['domainid'] > 0);
|
||||
}
|
||||
|
||||
private function generateKey()
|
||||
|
||||
@@ -513,7 +513,8 @@ class CustomersTest extends TestCase
|
||||
'customernumber' => 1338,
|
||||
'sendpassword' => 0,
|
||||
'perlenabled' => 2,
|
||||
'dnsenabled' => 4
|
||||
'dnsenabled' => 4,
|
||||
'createstdsubdomain' => 0
|
||||
];
|
||||
|
||||
$json_result = Customers::getLocal($admin_userdata, $data)->add();
|
||||
|
||||
@@ -24,6 +24,7 @@ class DomainsTest extends TestCase
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
$data = [
|
||||
'domain' => 'TEST.local',
|
||||
@@ -425,4 +426,25 @@ class DomainsTest extends TestCase
|
||||
'domainname' => 'उदाहरण.भारत'
|
||||
])->delete();
|
||||
}
|
||||
|
||||
public function testAdminDomainsAddDnsLetsEncryptFail()
|
||||
{
|
||||
global $admin_userdata;
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
Settings::Set('system.le_domain_dnscheck', 1);
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
$data = [
|
||||
'domain' => 'no-dns.local',
|
||||
'customerid' => $customer_userdata['customerid'],
|
||||
'letsencrypt' => 1,
|
||||
'description' => 'no dns domain'
|
||||
];
|
||||
|
||||
$this->expectExceptionCode(400);
|
||||
$this->expectExceptionMessage('The domains DNS does not include any of the chosen IP addresses. Let\'s Encrypt certificate generation not possible.');
|
||||
Domains::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,12 +72,12 @@ class IpsAndPortsTest extends TestCase
|
||||
{
|
||||
global $admin_userdata;
|
||||
$data = [
|
||||
'ip' => '2a01:440:1:12:82:149:225:46',
|
||||
'ip' => '2a01:0440:0000:0012:0082:0149:0225:0046',
|
||||
'docroot' => '/var/www/html'
|
||||
];
|
||||
$json_result = IpsAndPorts::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(4, $result['id']);
|
||||
$this->assertEquals('2a01:440:0:12:82:149:225:46', $result['ip']);
|
||||
$this->assertEquals('/var/www/html/', $result['docroot']);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,39 @@ class MysqlsTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testCustomerMysqlsDBNameAdd() {
|
||||
global $admin_userdata;
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
// Set customer.mysqlprefix to DBNAME
|
||||
Settings::Set('customer.mysqlprefix', 'DBNAME');
|
||||
|
||||
$newPwd = \Froxlor\System\Crypt::generatePassword();
|
||||
$data = [
|
||||
'mysql_password' => $newPwd,
|
||||
'custom_suffix' => 'abc123',
|
||||
'description' => 'testdb',
|
||||
'sendinfomail' => TRAVIS_CI == 1 ? 0 : 1
|
||||
];
|
||||
$json_result = Mysqls::getLocal($customer_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('test1_abc123', $result['databasename']);
|
||||
$this->assertEquals(0, $result['dbserver']);
|
||||
|
||||
// test connection
|
||||
try {
|
||||
$test_conn = new \PDO("mysql:host=127.0.0.1", 'test1_abc123', $newPwd);
|
||||
unset($test_conn);
|
||||
} catch (PDOException $e) {
|
||||
$this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsAdd
|
||||
@@ -136,7 +169,7 @@ class MysqlsTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsAdd
|
||||
@@ -144,7 +177,7 @@ class MysqlsTest extends TestCase
|
||||
public function testAdminMysqlsUpdatePwdOnly()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$newPwd = \Froxlor\System\Crypt::generatePassword();
|
||||
$data = [
|
||||
'dbname' => 'test1sql1',
|
||||
@@ -172,12 +205,13 @@ class MysqlsTest extends TestCase
|
||||
|
||||
$json_result = Mysqls::getLocal($customer_userdata)->listing();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(1, $result['count']);
|
||||
$this->assertEquals(2, $result['count']);
|
||||
$this->assertEquals('test1sql1', $result['list'][0]['databasename']);
|
||||
$this->assertEquals('test1_abc123', $result['list'][1]['databasename']);
|
||||
|
||||
$json_result = Mysqls::getLocal($customer_userdata)->listingCount();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(1, $result);
|
||||
$this->assertEquals(2, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,6 +236,28 @@ class MysqlsTest extends TestCase
|
||||
$this->assertEquals('test1sql1', $result['databasename']);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsList
|
||||
*/
|
||||
public function testCustomerMysqlsDBNameDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
$data = [
|
||||
'dbname' => 'test1_abc123'
|
||||
];
|
||||
$json_result = Mysqls::getLocal($customer_userdata, $data)->delete();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('test1_abc123', $result['databasename']);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsAdd
|
||||
|
||||
@@ -260,4 +260,24 @@ class SubDomainsTest extends TestCase
|
||||
$this->assertEquals('mysub.test2.local', $result['domain']);
|
||||
$this->assertEquals($customer_userdata['customerid'], $result['customerid']);
|
||||
}
|
||||
|
||||
public function testCustomerSubDomainsAddDnsLetsEncryptFail()
|
||||
{
|
||||
global $admin_userdata;
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
\Froxlor\Settings::Set('system.le_domain_dnscheck', 1);
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
$data = [
|
||||
'subdomain' => 'nodns',
|
||||
'domain' => 'test2.local',
|
||||
'letsencrypt' => 1
|
||||
];
|
||||
|
||||
$this->expectExceptionCode(400);
|
||||
$this->expectExceptionMessage('The domains DNS does not include any of the chosen IP addresses. Let\'s Encrypt certificate generation not possible.');
|
||||
SubDomains::getLocal($customer_userdata, $data)->add();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user