Skip to content

Commit

Permalink
more info on preconfig regarding antispam feature and what will happe…
Browse files Browse the repository at this point in the history
…n if not enabled; add comma to allowed characters in log-messages; make admin-username case-insensitive in the installation; show php-settings when adding/editing a domain as customer only if php is enbaled for the customer

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Jun 19, 2024
1 parent f8032b1 commit 3a2e70f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion install/updates/preconfig/preconfig_2.2.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

if (Update::versionInUpdate($current_version, '2.2.0-dev1')) {
$has_preconfig = true;
$description = 'Froxlor now features antispam configurations using rspamd. Would you like to enable the antispam feature (required re-configuration of services)?';
$description = 'Froxlor now features antispam configurations using rspamd. Would you like to enable the antispam feature (required re-configuration of services)?<br><strong>ATTENTION:</strong> When not enabled and the former DomainKey feature was used, keep in mind that all existing domainkeys for all domain are being removed and the dkim-flag disabled for the domains.';
$question = '<strong>Enable antispam (recommended)</strong>&nbsp;';
$return['antispam_activated'] = [
'type' => 'checkbox',
Expand Down
2 changes: 1 addition & 1 deletion lib/Froxlor/FroxlorLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function logAction($action = FroxlorLogger::USR_ACTION, int $type = LOG_N
}

// clean log-text
$text = preg_replace("/[^\w @#\"':.()\[\]+\-_\/\\\!]/i", "_", $text);
$text = preg_replace("/[^\w @#\"':.,()\[\]+\-_\/\\\!]/i", "_", $text);

if (self::$crondebug_flag || ($action == FroxlorLogger::CRON_ACTION && $type <= LOG_WARNING)) {
echo "[" . $this->getLogLevelDesc($type) . "] " . $text . PHP_EOL;
Expand Down
2 changes: 1 addition & 1 deletion lib/Froxlor/Install/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public function checkAdminUser(array $validatedData): void

if (!preg_match('/^[^\r\n\t\f\0]*$/D', $name)) {
throw new Exception(lng('error.stringformaterror', ['admin_name']));
} elseif (empty(trim($loginname)) || !preg_match('/^[a-z][a-z0-9]+$/', $loginname)) {
} elseif (empty(trim($loginname)) || !preg_match('/^[a-z][a-z0-9]+$/Di', $loginname)) {
throw new Exception(lng('error.loginnameiswrong', [$loginname]));
} elseif (empty(trim($email)) || !Validate::validateEmail($email)) {
throw new Exception(lng('error.emailiswrong', [$email]));
Expand Down
2 changes: 1 addition & 1 deletion lib/formfields/customer/domains/formfield.domains_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
'select_var' => $openbasedir
],
'phpsettingid' => [
'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0,
'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0 && $userinfo['phpenabled'] == '1',
'label' => lng('admin.phpsettings.title'),
'type' => 'select',
'select_var' => $phpconfigs,
Expand Down
2 changes: 1 addition & 1 deletion lib/formfields/customer/domains/formfield.domains_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
'selected' => $result['openbasedir_path']
],
'phpsettingid' => [
'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0,
'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0 && $userinfo['phpenabled'] == '1' && $result['phpenabled'] == '1',
'label' => lng('admin.phpsettings.title'),
'type' => 'select',
'select_var' => $phpconfigs,
Expand Down

0 comments on commit 3a2e70f

Please sign in to comment.