From b739f38a07a454228e665041ffb6cbadea9df2bd Mon Sep 17 00:00:00 2001 From: Dennis Riehle Date: Mon, 8 Aug 2016 11:04:38 +0200 Subject: [PATCH 001/302] If the user does not have the move to junk option enabled, mails should not be moved to junk! Therefore, only the further processing of mails should be stopped to prevent sending autoreplies to junk mails. --- server/conf/sieve_filter_1.2.master | 1 - 1 file changed, 1 deletion(-) diff --git a/server/conf/sieve_filter_1.2.master b/server/conf/sieve_filter_1.2.master index 08473e69c0..0dd9e62e6c 100644 --- a/server/conf/sieve_filter_1.2.master +++ b/server/conf/sieve_filter_1.2.master @@ -27,7 +27,6 @@ keep; # Move spam to spam folder if header :contains "X-Spam-Flag" "YES" { - fileinto "Junk"; # Stop here so that we do not reply on spams stop; } -- GitLab From 724c8a66b0261e614099dfa53f611c2ba2dbb095 Mon Sep 17 00:00:00 2001 From: Dennis Riehle Date: Mon, 8 Aug 2016 11:07:08 +0200 Subject: [PATCH 002/302] Enable the imap4flags module from Sieve to allow users to mark mails as read by using `setflag "\\Seen";` --- server/conf/sieve_filter.master | 2 +- server/conf/sieve_filter_1.2.master | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/conf/sieve_filter.master b/server/conf/sieve_filter.master index e161a9f499..ff6a74b22b 100644 --- a/server/conf/sieve_filter.master +++ b/server/conf/sieve_filter.master @@ -1,4 +1,4 @@ -require ["fileinto", "regex", "vacation"]; +require ["fileinto", "regex", "vacation", "imap4flags"]; # Send a copy of email to diff --git a/server/conf/sieve_filter_1.2.master b/server/conf/sieve_filter_1.2.master index 0dd9e62e6c..7580e190dc 100644 --- a/server/conf/sieve_filter_1.2.master +++ b/server/conf/sieve_filter_1.2.master @@ -1,4 +1,4 @@ -require ["fileinto", "regex", "date", "relational", "vacation"]; +require ["fileinto", "regex", "date", "relational", "vacation", "imap4flags"]; # Send a copy of email to -- GitLab From 249628fc9d0faf5c3e7d8956dc33b4ab19c60c65 Mon Sep 17 00:00:00 2001 From: Dennis Riehle Date: Mon, 8 Aug 2016 11:33:34 +0200 Subject: [PATCH 003/302] Implemented "Mark as read" in the web interface, currently only for Sieve, not for Maildrop --- interface/lib/plugins/mail_user_filter_plugin.inc.php | 4 ++++ interface/web/mail/form/mail_user_filter.tform.php | 2 +- interface/web/mail/lib/lang/ar_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/bg_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/br_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/ca_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/cz_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/de_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/el_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/en_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/es_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/fi_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/fr_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/hr_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/hu_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/id_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/it_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/ja_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/nl_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/pl_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/pt_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/ro_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/ru_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/se_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/sk_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/tr_mail_user_filter.lng | 1 + 26 files changed, 29 insertions(+), 1 deletion(-) diff --git a/interface/lib/plugins/mail_user_filter_plugin.inc.php b/interface/lib/plugins/mail_user_filter_plugin.inc.php index 5afd1c0044..5b898f84c6 100644 --- a/interface/lib/plugins/mail_user_filter_plugin.inc.php +++ b/interface/lib/plugins/mail_user_filter_plugin.inc.php @@ -193,6 +193,8 @@ class mail_user_filter_plugin { $content .= " stop;\n"; } elseif ($page_form->dataRecord["action"] == 'reject') { $content .= ' reject "'.$page_form->dataRecord["target"].'"; stop;\n\n'; + } elseif ($page_form->dataRecord["action"] == 'read') { + $content .= ' setflag "\\\\Seen";\n stop;\n'; } else { $content .= " discard;\n stop;\n"; } @@ -254,6 +256,8 @@ if ( ".'$RETURNCODE'." != 1 ) $content .= 'ID' . "$page_form->id" . 'EndFolder = "$DEFAULT/.' . $page_form->dataRecord['target'] . '/"' . "\n"; $content .= "xfilter \"/usr/bin/formail -A \\\"X-User-Mail-Filter-ID"."$page_form->id".": Yes\\\"\"" . "\n"; $content .= "to ". '$ID' . "$page_form->id" . 'EndFolder' . "\n"; + } elseif ($page_form->dataRecord["action"] == 'read') { + $content .= ''; // mark as read currently not supported for Maildrop } else { $content .= "to /dev/null\n"; } diff --git a/interface/web/mail/form/mail_user_filter.tform.php b/interface/web/mail/form/mail_user_filter.tform.php index d5f6a0ab5b..341f8ad857 100644 --- a/interface/web/mail/form/mail_user_filter.tform.php +++ b/interface/web/mail/form/mail_user_filter.tform.php @@ -106,7 +106,7 @@ $form["tabs"]['filter'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => '', - 'value' => array('move' => 'move_to_txt', 'delete'=>'delete_txt') + 'value' => array('move' => 'move_to_txt', 'delete'=>'delete_txt', 'read'=>'mark_read_txt') ), 'target' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/mail/lib/lang/ar_mail_user_filter.lng b/interface/web/mail/lib/lang/ar_mail_user_filter.lng index b5d31b589c..afeb152854 100644 --- a/interface/web/mail/lib/lang/ar_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/ar_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/bg_mail_user_filter.lng b/interface/web/mail/lib/lang/bg_mail_user_filter.lng index 9eb3325c72..0d39ba8555 100644 --- a/interface/web/mail/lib/lang/bg_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/bg_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/br_mail_user_filter.lng b/interface/web/mail/lib/lang/br_mail_user_filter.lng index aa33adffeb..6a540bc941 100644 --- a/interface/web/mail/lib/lang/br_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/br_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/ca_mail_user_filter.lng b/interface/web/mail/lib/lang/ca_mail_user_filter.lng index 14b80ee07b..bb4d1120dc 100644 --- a/interface/web/mail/lib/lang/ca_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/ca_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/cz_mail_user_filter.lng b/interface/web/mail/lib/lang/cz_mail_user_filter.lng index c8d3a489a8..ff1a0c44b2 100644 --- a/interface/web/mail/lib/lang/cz_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/cz_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/de_mail_user_filter.lng b/interface/web/mail/lib/lang/de_mail_user_filter.lng index c9fb78fcee..e951d18c6b 100644 --- a/interface/web/mail/lib/lang/de_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/de_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Behalten'; $wb['reject_txt'] = 'Abweisen'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Verschiebe nach'; +$wb['mark_read_txt'] = 'Als gelesen markieren'; ?> diff --git a/interface/web/mail/lib/lang/el_mail_user_filter.lng b/interface/web/mail/lib/lang/el_mail_user_filter.lng index f3957144ae..cbfef59e8f 100644 --- a/interface/web/mail/lib/lang/el_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/el_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/en_mail_user_filter.lng b/interface/web/mail/lib/lang/en_mail_user_filter.lng index e78f808efa..6bec7601c3 100644 --- a/interface/web/mail/lib/lang/en_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/en_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/es_mail_user_filter.lng b/interface/web/mail/lib/lang/es_mail_user_filter.lng index 94100ef7a3..1c190b3ef3 100755 --- a/interface/web/mail/lib/lang/es_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/es_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['target_error_regex'] = 'El destino solo puede contener los siguientes carac $wb['target_txt'] = 'Carpeta'; $wb['to_txt'] = 'Para'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/fi_mail_user_filter.lng b/interface/web/mail/lib/lang/fi_mail_user_filter.lng index 1a4e7218a2..7a7c53cbf2 100755 --- a/interface/web/mail/lib/lang/fi_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/fi_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/fr_mail_user_filter.lng b/interface/web/mail/lib/lang/fr_mail_user_filter.lng index 49c5076d95..2170686fa0 100644 --- a/interface/web/mail/lib/lang/fr_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/fr_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/hr_mail_user_filter.lng b/interface/web/mail/lib/lang/hr_mail_user_filter.lng index 4441ecf5e4..72cebfcc15 100644 --- a/interface/web/mail/lib/lang/hr_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/hr_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/hu_mail_user_filter.lng b/interface/web/mail/lib/lang/hu_mail_user_filter.lng index 750f3c1ae5..544ef41d9a 100644 --- a/interface/web/mail/lib/lang/hu_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/hu_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/id_mail_user_filter.lng b/interface/web/mail/lib/lang/id_mail_user_filter.lng index 0def30d1a8..571c948051 100644 --- a/interface/web/mail/lib/lang/id_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/id_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/it_mail_user_filter.lng b/interface/web/mail/lib/lang/it_mail_user_filter.lng index bad797d6d5..d06f4fb30d 100644 --- a/interface/web/mail/lib/lang/it_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/it_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/ja_mail_user_filter.lng b/interface/web/mail/lib/lang/ja_mail_user_filter.lng index 847640fee4..ba6d580801 100644 --- a/interface/web/mail/lib/lang/ja_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/ja_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/nl_mail_user_filter.lng b/interface/web/mail/lib/lang/nl_mail_user_filter.lng index 903b610729..d7165f3caf 100644 --- a/interface/web/mail/lib/lang/nl_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/nl_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/pl_mail_user_filter.lng b/interface/web/mail/lib/lang/pl_mail_user_filter.lng index 1f0b071f19..40315f3309 100644 --- a/interface/web/mail/lib/lang/pl_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/pl_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/pt_mail_user_filter.lng b/interface/web/mail/lib/lang/pt_mail_user_filter.lng index 42a7481d70..7d30884471 100644 --- a/interface/web/mail/lib/lang/pt_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/pt_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/ro_mail_user_filter.lng b/interface/web/mail/lib/lang/ro_mail_user_filter.lng index 7c5c72ad72..07a3b64ff9 100644 --- a/interface/web/mail/lib/lang/ro_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/ro_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/ru_mail_user_filter.lng b/interface/web/mail/lib/lang/ru_mail_user_filter.lng index 1e5bf5a767..97f3bbe6c0 100644 --- a/interface/web/mail/lib/lang/ru_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/ru_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/se_mail_user_filter.lng b/interface/web/mail/lib/lang/se_mail_user_filter.lng index 0cd888b2e5..d82eb7f0d8 100644 --- a/interface/web/mail/lib/lang/se_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/se_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/sk_mail_user_filter.lng b/interface/web/mail/lib/lang/sk_mail_user_filter.lng index 20904653c6..ae01782346 100644 --- a/interface/web/mail/lib/lang/sk_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/sk_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> diff --git a/interface/web/mail/lib/lang/tr_mail_user_filter.lng b/interface/web/mail/lib/lang/tr_mail_user_filter.lng index 38eb4a4e28..aaa41348af 100644 --- a/interface/web/mail/lib/lang/tr_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/tr_mail_user_filter.lng @@ -26,4 +26,5 @@ $wb['keep_txt'] = 'Keep'; $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; +$wb['mark_read_txt'] = 'Mark as read'; ?> -- GitLab From b2214f5d2692aeff25e94da275fbf4e8958ed4a9 Mon Sep 17 00:00:00 2001 From: Michele Date: Thu, 1 Sep 2016 16:18:13 +0200 Subject: [PATCH 004/302] Added MLMMJ installer --- install/dist/conf/debian40.conf.php | 4 + install/dist/conf/debian60.conf.php | 4 + install/install.php | 6 + install/lib/installer_base.lib.php | 106 +++++++ install/tpl/mlmmj.conf.master | 5 + install/update.php | 6 + server/plugins-available/mlmmj_plugin.inc.php | 277 ++++++++++++++++++ 7 files changed, 408 insertions(+) create mode 100644 install/tpl/mlmmj.conf.master create mode 100644 server/plugins-available/mlmmj_plugin.inc.php diff --git a/install/dist/conf/debian40.conf.php b/install/dist/conf/debian40.conf.php index 613c828d14..a85841e4ff 100644 --- a/install/dist/conf/debian40.conf.php +++ b/install/dist/conf/debian40.conf.php @@ -120,6 +120,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/debian60.conf.php b/install/dist/conf/debian60.conf.php index 2c26dcb9cb..a7ea136456 100644 --- a/install/dist/conf/debian60.conf.php +++ b/install/dist/conf/debian60.conf.php @@ -120,6 +120,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/install.php b/install/install.php index 1e0899f02b..b84446414b 100644 --- a/install/install.php +++ b/install/install.php @@ -335,6 +335,12 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Mail $inst->configure_mailman(); } + //* Configure mlmmj + if($conf['mlmmj']['installed'] == true) { + swriteln('Configuring Mlmmj'); + $inst->configure_mlmmj(/*install*/); + } + //* Check for Dovecot and Courier if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot', ($install_mode == 'expert')); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index fc95bef038..36a9aadcdd 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -157,6 +157,7 @@ class installer_base { if(is_installed('postfix')) $conf['postfix']['installed'] = true; if(is_installed('postgrey')) $conf['postgrey']['installed'] = true; if(is_installed('mailman') || is_installed('mmsitepass')) $conf['mailman']['installed'] = true; + if(is_installed('mlmmj') || is_installed('mlmmj-make-ml')) $conf['mlmmj']['installed'] = true; if(is_installed('apache') || is_installed('apache2') || is_installed('httpd') || is_installed('httpd2')) $conf['apache']['installed'] = true; if(is_installed('getmail')) $conf['getmail']['installed'] = true; if(is_installed('courierlogger')) $conf['courier']['installed'] = true; @@ -809,6 +810,111 @@ class installer_base { exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman'); } + public function configure_mlmmj() { + global $conf; + + $configDir = $conf['mlmmj']['config_dir']; + @mkdir($configDir, 0755, true); + + $configFile = 'mlmmj.conf'; + + //* Backup exiting file + if(is_file("$configDir/$configFile")) { + copy("$configDir/$configFile", "$configDir/$configFile~"); + } + + // load files + if(is_file($conf['ispconfig_install_dir']."/server/conf-custom/install/$configFile.master")) { + copy($conf['ispconfig_install_dir']."/server/conf-custom/install/$configFile.master", "$configDir/$configFile"); + } else { + copy("tpl/$configFile.master", "$configDir/$configFile"); + } + + $mlConfig = @parse_ini_file("$configDir/$configFile"); + // Force PHP7 to use # to mark comments + if(PHP_MAJOR_VERSION >= 7) + $mlConfig = array_filter($mlConfig, function($v){return(substr($v,0,1)!=='#');}, ARRAY_FILTER_USE_KEY); + + $command = 'useradd --system mlmmj --home '.$mlConfig['spool_dir'].' --shell /usr/false'; + if(!is_user('mlmmj')) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + + @mkdir($mlConfig['spool_dir'], 0755, true); + chown($mlConfig['spool_dir'], 'mlmmj'); + chgrp($mlConfig['spool_dir'], 'mlmmj'); + + // Make a backup copy of master.cf and main.cf files + copy($conf['postfix']['config_dir'].'/main.cf', $conf['postfix']['config_dir'].'/main.cf~mlmmj'); + + //* Update postfix main.cf + $content = rf($conf['postfix']['config_dir'].'/main.cf'); + + if(!preg_match("/^alias_maps = .*hash:\/etc\/mlmmj\/aliases.*/m", $content)) { + $content = preg_replace("/^alias_maps = (.*)/m", "$0, hash:$configDir/aliases", $content); + } + + if(!preg_match("/^alias_database = .*hash:\/etc\/mlmmj\/aliases.*/m", $content)) { + $content = preg_replace("/^alias_database = (.*)/m", "$0, hash:$configDir/aliases", $content); + } + + if(!preg_match("/^virtual_alias_maps = .*hash:\/etc\/mlmmj\/virtual.*/m", $content)) { + $content = preg_replace("/^virtual_alias_maps = (.*)/m", "$0, hash:$configDir/virtual", $content); + } + + if(!preg_match("/^transport_maps = .*hash:\/etc\/mlmmj\/transport.*/m", $content)) { + $content = preg_replace("/transport_maps = (.*)/m", "$0, hash:$configDir/transport", $content); + } + + if(!preg_match("/^mlmmj_destination_recipient_limit.*/m", $content)) { + $content .= "\n# Only deliver one message to Mlmmj at a time\nmlmmj_destination_recipient_limit = 1\n"; + } + + wf($conf['postfix']['config_dir'].'/main.cf', $content); + + //* Update postfix master.cf + $content = rf($conf['postfix']['config_dir'].'/master.cf'); + if(!preg_match('/^mlmmj\s+unix\s+-\s+n\s+n\s+-\s+-\s+pipe\s*$/m', $content)) { + copy($conf['postfix']['config_dir'].'/master.cf', $conf['postfix']['config_dir'].'/master.cf~mlmmj'); + $content .= "\n# mlmmj mailing lists\n"; + $content .= "mlmmj unix - n n - - pipe\n"; + $content .= " flags=ORhu user=mlmmj argv=/usr/local/bin/mlmmj-receive -F -L /var/spool/mlmmj/\$nexthop\n\n"; + wf($conf['postfix']['config_dir'].'/master.cf', $content); + } + + //* Create aliasaes + touch("$configDir/aliases"); + exec("nohup /usr/sbin/postalias $configDir/aliases >/dev/null 2>&1"); + touch("$configDir/virtual"); + exec("nohup /usr/sbin/postmap $configDir/virtual >/dev/null 2>&1"); + touch("$configDir/transport"); + exec("nohup /usr/sbin/postmap $configDir/transport >/dev/null 2>&1"); + + // ALTER TABLE `mail_mailinglist` ADD `closedlist` enum('n','y') NOT NULL DEFAULT 'y' + // ALTER TABLE `mail_mailinglist` ADD `closedlistsub` enum('n','y') NOT NULL DEFAULT 'y' + // ALTER TABLE `mail_mailinglist` ADD `moderated` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `tocc` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `subonlypost` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `modonlypost` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `modnonsubposts` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `addtohdr` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `notifysub` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `notifymod` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `noarchive` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nosubconfirm` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `noget` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `notoccdenymails` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `noaccessdenymails` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nosubonlydenymails` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nomodonlydenymails` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nosubmodmails` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nodigesttext` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nodigestsub` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nonomailsub` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nomaxmailsizedenymails` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `nolistsubsemail` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `ifmodsendonlymodmoderate` enum('n','y') NOT NULL DEFAULT 'n' + // ALTER TABLE `mail_mailinglist` ADD `notmetoo` enum('n','y') NOT NULL DEFAULT 'n' + } + public function get_postfix_service($service, $type) { global $conf; diff --git a/install/tpl/mlmmj.conf.master b/install/tpl/mlmmj.conf.master new file mode 100644 index 0000000000..44ba9e8728 --- /dev/null +++ b/install/tpl/mlmmj.conf.master @@ -0,0 +1,5 @@ +# Path of the skeleton for mailing lists +skel_dir = /usr/share/mlmmj/text.skel + +# Where to store ML data and archive +spool_dir = /var/spool/mlmmj \ No newline at end of file diff --git a/install/update.php b/install/update.php index 4626b5044e..20886f75b7 100644 --- a/install/update.php +++ b/install/update.php @@ -351,6 +351,12 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel $inst->configure_mailman('update'); } + //* Configure mlmmj + if($conf['mlmmj']['installed'] == true && $inst->reconfigure_app('Mlmmj', $reconfigure_services_answer)) ) { + swriteln('Configuring Mlmmj'); + $inst->configure_mlmmj(/*update*/); + } + //** Configure Spamasassin if($inst->reconfigure_app('Spamassassin', $reconfigure_services_answer)) { swriteln('Configuring Spamassassin'); diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php new file mode 100644 index 0000000000..547641f8b2 --- /dev/null +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -0,0 +1,277 @@ + 10100 Srl + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ + +/* +templates/mail_mailinglist_list.htm +templates/mail_mailinglist_edit.htm + +list/mail_mailinglist.list.php + +form/mail_mailinglist.tform.php + +mailinglist.php +mail_mailinglist_list.php +mail_mailinglist_edit.php +mail_mailinglist_del.php +*/ + +class mlmmj_plugin { + const ML_ALIAS = 0; + const ML_TRANSPORT = 1; + const ML_VIRTUAL = 2; + + private $plugin_name = 'mlmmj_plugin'; + private $class_name = 'mlmmj_plugin'; + private $mlmmj_config_dir = '/etc/mlmmj/'; + + /* + This function is called during ispconfig installation to determine + if a symlink shall be created for this plugin. + */ + function onInstall() { + global $conf; + + if($conf['services']['mail'] == true) return true; + else return false; + } + + //This function is called when the plugin is loaded + function onLoad() { + global $app; + + // Register for the events + $app->plugins->registerEvent('mail_mailinglist_insert', 'mlmmj_plugin', 'insert'); + $app->plugins->registerEvent('mail_mailinglist_update', 'mlmmj_plugin', 'update'); + $app->plugins->registerEvent('mail_mailinglist_delete', 'mlmmj_plugin', 'delete'); + } + + function insert($event_name, $data) { + global $app; + + /*[new] => Array + ( + [mailinglist_id] => 8 + [sys_userid] => 1 + [sys_groupid] => 26 + [sys_perm_user] => riud + [sys_perm_group] => ru + [sys_perm_other] => + [server_id] => 0 + [domain] => 10100.to + [listname] => merda + [email] => michele@10100.to + [password] => vbhXvWMK!1 + )*/ + + $mlConf = $this->getMlConfig(); + $listDomain = $data['new']['domain']; + $listName = $data['new']['listname']; + $listDir = $mlConf['spool_dir']."/$listDomain/$listName"; + $lang = 'en'; + $owner = $data['new']['email']; + + // Creating ML directories structure + mkdir("$listDir/incoming", 0755, true); + mkdir("$listDir/queue/discarded", 0755, true); + mkdir("$listDir/archive", 0755, true); + mkdir("$listDir/text", 0755, true); + mkdir("$listDir/subconf", 0755, true); + mkdir("$listDir/unsubconf", 0755, true); + mkdir("$listDir/bounce", 0755, true); + mkdir("$listDir/control", 0755, true); + mkdir("$listDir/moderation", 0755, true); + mkdir("$listDir/subscribers.d", 0755, true); + mkdir("$listDir/digesters.d", 0755, true); + mkdir("$listDir/requeue", 0755, true); + mkdir("$listDir/nomailsubs.d", 0755, true); + + // Creating ML index file + touch("$listDir/index"); + + // Saving ML base data + file_put_contents("$listDir/control/owner", $owner); + file_put_contents("$listDir/control/listaddress", "$listName@$listDomain"); + + // Copying language translations + if(!is_dir("/usr/share/mlmmj/text.skel/$lang")) $lang = 'en'; + foreach (glob("/usr/share/mlmmj/text.skel/$lang/*") as $filename) + copy($filename, "$listDir/text/".basename($filename)); + + // The mailinglist directory have to be owned by the user running the mailserver + $this->chmodR($listDir); + + // Creating alias entry + $this->addMapEntry("$listName: \"|/usr/bin/mlmmj-recieve -L $listDir/\"", self::ML_ALIAS); + + // Creating transport entry + $this->addMapEntry("$listDomain--$listName@localhost.mlmmj mlmmj:$listDomain/$listName", self::ML_TRANSPORT); + + // Creating virtual entry + $this->addMapEntry("$listName@$listDomain $listDomain--$listName@localhost.mlmmj", self::ML_VIRTUAL); + + $mlmmjmaintd='/usr/bin/mlmmj-maintd'; +// CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$FQDN/$LISTNAME/\"" + +// /usr/sbin/postfix reload + $app->db->query("UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = ".$app->db->quote($data["new"]['mailinglist_id'])); + } + + // The purpose of this plugin is to rewrite the main.cf file + function update($event_name, $data) { + global $app, $conf; + +// $this->update_config(); +// +// if($data["new"]["password"] != $data["old"]["password"] && $data["new"]["password"] != '') { +// exec("nohup /usr/lib/mailman/bin/change_pw -l ".escapeshellcmd($data["new"]["listname"])." -p ".escapeshellcmd($data["new"]["password"])." >/dev/null 2>&1 &"); +// exec('nohup '.$conf['init_scripts'] . '/' . 'mailman reload >/dev/null 2>&1 &'); +// $app->db->query("UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = ".$app->db->quote($data["new"]['mailinglist_id'])); +// } +// +// if(is_file('/var/lib/mailman/data/virtual-mailman')) exec('postmap /var/lib/mailman/data/virtual-mailman'); +// if(is_file('/var/lib/mailman/data/transport-mailman')) exec('postmap /var/lib/mailman/data/transport-mailman'); + } + + function delete($event_name, $data) { + global $app; + + $mlConf = $this->getMlConfig(); + $listDomain = $data['old']['domain']; + $listName = $data['old']['listname']; + $listDir = $mlConf['spool_dir']."/$listDomain/$listName"; + $lang = 'en'; + $owner = $data['old']['email']; + + // Removing alias entry + $this->delMapEntry("$listName: \"|/usr/bin/mlmmj-recieve -L $listDir/\"", self::ML_ALIAS); + + // Removing transport entry + $this->delMapEntry("$listDomain--$listName@localhost.mlmmj mlmmj:$listDomain/$listName", self::ML_TRANSPORT); + + // Removing virtual entry + $this->delMapEntry("$listName@$listDomain $listDomain--$listName@localhost.mlmmj", self::ML_VIRTUAL); + + + $this->rmdirR($listDir); + + // Remove parent folder if is empty (means there aren't other ML for the domain) + @rmdir($mlConf['spool_dir']."/$listDomain"); + + $mlmmjmaintd='/usr/bin/mlmmj-maintd'; +// CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$FQDN/$LISTNAME/\"" + } + + private function getMlConfig() { + $mlConfig = parse_ini_file($this->mlmmj_config_dir.'mlmmj.conf'); + + // Force PHP7 to use # to mark comments + if(PHP_MAJOR_VERSION >= 7) + $mlConfig = array_filter($mlConfig, function($v){return(substr($v,0,1)!=='#');}, ARRAY_FILTER_USE_KEY); + + return $mlConfig; + } + + private function chmodR($dir) { + if($objs = glob($dir."/*")) { + foreach($objs as $obj) { + chown($obj, 'mlmmj'); + chgrp($obj, 'mlmmj'); + if(is_dir($obj)) $this->chmodR($obj); + } + } + + return chown($dir, 'mlmmj') && chgrp($dir, 'mlmmj'); + } + + private function rmdirR($path) { + if(is_dir($path) === true) { + $files = array_diff(scandir($path), array('.', '..')); + foreach($files as $file) $this->rmdirR(realpath($path) . '/' . $file); + + return rmdir($path); + } elseif(is_file($path) === true) return unlink($path); + + return false; + } + + private function addMapEntry($directive, $type) { + + $destFile = $this->mlmmj_config_dir; + switch($type) { + case self::ML_ALIAS: + $destFile .= 'aliases'; + $command = 'postalias'; + break; + case self::ML_TRANSPORT: + $destFile .= 'transport'; + $command = 'postmap'; + break; + case self::ML_VIRTUAL: + $destFile .= 'virtual'; + $command = 'postmap'; + break; + } + + $lines = file($destFile, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); + $lines[] = $directive; + + file_put_contents($destFile, implode("\n", array_unique($lines))); + exec("nohup /usr/sbin/$command $destFile >/dev/null 2>&1 &"); + } + + private function delMapEntry($directive, $type) { + + $destFile = $this->mlmmj_config_dir; + switch($type) { + case self::ML_ALIAS: + $destFile .= 'aliases'; + $command = 'postalias'; + break; + case self::ML_TRANSPORT: + $destFile .= 'transport'; + $command = 'postmap'; + break; + case self::ML_VIRTUAL: + $destFile .= 'virtual'; + $command = 'postmap'; + break; + } + + $lines = file($destFile, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); + + foreach(array_keys($lines, $directive) as $key) unset($lines[$key]); + + file_put_contents($destFile, implode("\n", array_unique($lines))); + exec("nohup /usr/sbin/$command $destFile >/dev/null 2>&1 &"); + } + + private function checkSys() { + if(!is_dir($this->mlmmj_config_dir)) mkdir($this->mlmmj_config_dir, 0755); + if(!file_exists($this->mlmmj_config_dir.'mlmmj.conf')) { + file_put_contents($this->mlmmj_config_dir.'mlmmj.conf', 'skel_dir = /usr/share/mlmmj/text.skel'); + file_put_contents($this->mlmmj_config_dir.'mlmmj.conf', 'spool_dir = /var/spool/mlmmj', FILE_APPEND); + } + if(!file_exists($this->mlmmj_config_dir.'aliases')) touch($this->mlmmj_config_dir.'aliases'); + if(!file_exists($this->mlmmj_config_dir.'transport')) touch($this->mlmmj_config_dir.'transport'); + if(!file_exists($this->mlmmj_config_dir.'virtual')) touch($this->mlmmj_config_dir.'virtual'); + } +} // end class + +?> -- GitLab From 7f0eba6dc405c631ad575966e88550cdad0a951a Mon Sep 17 00:00:00 2001 From: Michele Date: Thu, 1 Sep 2016 17:12:41 +0200 Subject: [PATCH 005/302] Replaceing wrong license banner --- server/plugins-available/mlmmj_plugin.inc.php | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php index 547641f8b2..bbb21eeb4a 100644 --- a/server/plugins-available/mlmmj_plugin.inc.php +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -1,21 +1,31 @@ 10100 Srl - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* -- GitLab From 86926a6ed52efc03ab706517dc8e6804ed26e0e1 Mon Sep 17 00:00:00 2001 From: Michele Date: Thu, 1 Sep 2016 19:32:00 +0200 Subject: [PATCH 006/302] Added switch to "System > Server config > mail" --- install/lib/installer_base.lib.php | 1 + install/tpl/server.ini.master | 1 + interface/web/admin/form/server_config.tform.php | 6 ++++++ interface/web/admin/templates/server_config_mail_edit.htm | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 36a9aadcdd..ff2f4ba3e2 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -314,6 +314,7 @@ class installer_base { $tpl_ini_array['web']['php_ini_path_cgi'] = $conf['apache']['php_ini_path_cgi']; $tpl_ini_array['mail']['pop3_imap_daemon'] = ($conf['dovecot']['installed'] == true)?'dovecot':'courier'; $tpl_ini_array['mail']['mail_filter_syntax'] = ($conf['dovecot']['installed'] == true)?'sieve':'maildrop'; + $tpl_ini_array['mail']['mailinglist'] = ($conf['mlmmj']['installed'] == true)?'mlmmj':'mailman'; $tpl_ini_array['dns']['bind_user'] = $conf['bind']['bind_user']; $tpl_ini_array['dns']['bind_group'] = $conf['bind']['bind_group']; $tpl_ini_array['dns']['bind_zonefiles_dir'] = $conf['bind']['bind_zonefiles_dir']; diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 8231e4acde..53c5390d02 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -54,6 +54,7 @@ overquota_notify_client=y overquota_notify_freq=7 overquota_notify_onok=n sendmail_path=/usr/sbin/sendmail +mailinglist=mlmmj [getmail] getmail_config_dir=/etc/getmail diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 9343084d04..9d797074bc 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -608,6 +608,12 @@ $form["tabs"]['mail'] = array( 'default' => 'n', 'value' => array(0 => 'n', 1 => 'y') ), + 'mailinglist' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'default' => '20', + 'value' => array('mlmmj' => 'Mlmmj', 'mailman' => 'Mailman') + ), //################################# // ENDE Datatable fields //################################# diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm index 926be8e62c..78a94f45b3 100644 --- a/interface/web/admin/templates/server_config_mail_edit.htm +++ b/interface/web/admin/templates/server_config_mail_edit.htm @@ -117,6 +117,12 @@ {tmpl_var name='overquota_notify_onok'} +
+ +
+
-- GitLab From 33b84ed64ce64aa40dcacc2fe73c14cfc86aa5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Fri, 2 Sep 2016 10:22:38 +0200 Subject: [PATCH 007/302] began implementing nagios connectors (Part 1: Viewing Nagios Info in ISPC) --- interface/web/monitor/lib/module.conf.php | 5 ++ interface/web/monitor/show_nagios.php | 82 +++++++++++++++++++ .../web/monitor/templates/show_nagios.htm | 12 +++ 3 files changed, 99 insertions(+) create mode 100644 interface/web/monitor/show_nagios.php create mode 100644 interface/web/monitor/templates/show_nagios.htm diff --git a/interface/web/monitor/lib/module.conf.php b/interface/web/monitor/lib/module.conf.php index 3da77838dc..38ca4e4530 100644 --- a/interface/web/monitor/lib/module.conf.php +++ b/interface/web/monitor/lib/module.conf.php @@ -121,6 +121,11 @@ $items[] = array( 'title' => "Show Services", 'target' => 'content', 'link' => 'monitor/show_data.php?type=services', 'html_id' => 'services'); + +$items[] = array( 'title' => "Show Nagios/Check_MK", + 'target' => 'content', + 'link' => 'monitor/show_nagios.php', + 'html_id' => 'nagios'); $items[] = array( 'title' => "Show Monit", 'target' => 'content', diff --git a/interface/web/monitor/show_nagios.php b/interface/web/monitor/show_nagios.php new file mode 100644 index 0000000000..db17ce4339 --- /dev/null +++ b/interface/web/monitor/show_nagios.php @@ -0,0 +1,82 @@ +auth->check_module_permissions('monitor'); + +$app->uses('tools_monitor'); + +// Loading the template +$app->uses('tpl'); +$app->tpl->newTemplate("form.tpl.htm"); +$app->tpl->setInclude('content_tpl', 'templates/show_nagios.htm'); + +$monTransSrv = $app->lng("monitor_settings_server_txt"); +$title = 'Nagios ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + +$app->tpl->setVar("list_head_txt", $title); + +if($_SESSION["s"]["user"]["typ"] == 'admin'){ + + $app->uses('getconf'); + $server_config = $app->getconf->get_server_config($_SESSION['monitor']['server_id'], 'server'); + + $nagios_url = trim($server_config['nagios_url']); + if($nagios_url != ''){ + $nagios_url = str_replace('[SERVERNAME]', $_SESSION['monitor']['server_name'], $nagios_url); + $nagios_user = trim($server_config['nagios_user']); + $nagios_password = trim($server_config['nagios_password']); + $auth_string = ''; + if($nagios_user != ''){ + $auth_string = rawurlencode($nagios_user); + } + if($nagios_user != '' && $nagios_password != ''){ + $auth_string .= ':'.rawurlencode($nagios_password); + } + if($auth_string != '') $auth_string .= '@'; + + $nagios_url_parts = parse_url($nagios_url); + + $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : '').(isset($nagios_url_parts['path']) ? $nagios_url_parts['path'] : '').(isset($nagios_url_parts['query']) ? '?' . $nagios_url_parts['query'] : '').(isset($nagios_url_parts['fragment']) ? '#' . $nagios_url_parts['fragment'] : ''); + + $app->tpl->setVar("nagios_url", $nagios_url); + } else { + $app->tpl->setVar("no_nagios_url_defined_txt", $app->lng("no_nagios_url_defined_txt")); + } +} else { + $app->tpl->setVar("no_permissions_to_view_nagios_txt", $app->lng("no_permissions_to_view_nagios_txt")); +} + +$app->tpl_defaults(); +$app->tpl->pparse(); +?> diff --git a/interface/web/monitor/templates/show_nagios.htm b/interface/web/monitor/templates/show_nagios.htm new file mode 100644 index 0000000000..0388cb7c65 --- /dev/null +++ b/interface/web/monitor/templates/show_nagios.htm @@ -0,0 +1,12 @@ + +

+ +
+ + + +

ERROR

  1. {tmpl_var name="no_nagios_url_defined_txt"} {tmpl_var name="no_permissions_to_view_nagios_txt"}
+
+
\ No newline at end of file -- GitLab From c126d814129ee91d09a07fc44eed809c8cc91f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Fri, 2 Sep 2016 10:44:20 +0200 Subject: [PATCH 008/302] first test for nagios view --- .../web/admin/form/server_config.tform.php | 28 +++++++++++++++++++ .../web/admin/lib/lang/de_server_config.lng | 5 ++++ 2 files changed, 33 insertions(+) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 9343084d04..b74af114b4 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -357,6 +357,34 @@ $form["tabs"]['server'] = array( 'width' => '40', 'maxlength' => '255' ), + 'nagios_url' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'validators' => array ( 0 => array ( 'type' => 'REGEX', + 'regex' => '/^((?:http|https)(?::\\/{2}[\\w]+)(?:[\\/|\\.]?)(?:[^\\s"]*))$/', + 'errmsg'=> 'nagios_url_error_regex'), + ), + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'nagios_user' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'nagios_password' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), 'monitor_system_updates' => array( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index 06384d5e32..a45258e980 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -198,6 +198,11 @@ $wb['munin_user_txt'] = 'Munin-Benutzer'; $wb['munin_password_txt'] = 'Munin-Passwort'; $wb['munin_url_error_regex'] = 'Ungültige Munin-URL'; $wb['munin_url_note_txt'] = 'Platzhalter:'; +$wb['nagios_url_txt'] = 'Nagios/Check_MK-URL'; +$wb['nagios_user_txt'] = 'Nagios-Benutzer'; +$wb['nagios_password_txt'] = 'Nagios-Passwort'; +$wb['nagios_url_error_regex'] = 'Ungültige Nagios-URL'; +$wb['nagios_url_note_txt'] = 'Platzhalter:'; $wb['backup_dir_is_mount_txt'] = 'Backupverzeichnis ist ein eigener Mount?'; $wb['backup_dir_mount_cmd_txt'] = 'Mount-Befehl, falls Backupverzeichnis nicht gemountet'; $wb['backup_delete_txt'] = 'Backups loeschen wenn eine Domain / Webseite geloescht wird'; -- GitLab From b06ddba61f284e7514bd374b1bd46219b5ef5d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Fri, 2 Sep 2016 11:59:28 +0200 Subject: [PATCH 009/302] added language vars for nagios, addad check_mk authentication mechanism. Known Bugs: CMK-URL is damaged (origtarget), iframe stays white...? --- .../web/admin/form/server_config.tform.php | 2 +- .../web/admin/lib/lang/de_server_config.lng | 8 ++-- .../web/admin/lib/lang/en_server_config.lng | 5 ++ .../templates/server_config_server_edit.htm | 10 ++++ interface/web/monitor/show_nagios.php | 46 ++++++++++++++----- 5 files changed, 55 insertions(+), 16 deletions(-) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index b74af114b4..961a812a84 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -362,7 +362,7 @@ $form["tabs"]['server'] = array( 'formtype' => 'TEXT', 'default' => '', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^((?:http|https)(?::\\/{2}[\\w]+)(?:[\\/|\\.]?)(?:[^\\s"]*))$/', + 'regex' => '/(^$)|(^((?:http|https)(?::\\/{2}[\\w]+)(?:[\\/|\\.]?)(?:[^\\s"]*))$)/', 'errmsg'=> 'nagios_url_error_regex'), ), 'value' => '', diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index a45258e980..502c4c387d 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -199,10 +199,10 @@ $wb['munin_password_txt'] = 'Munin-Passwort'; $wb['munin_url_error_regex'] = 'Ungültige Munin-URL'; $wb['munin_url_note_txt'] = 'Platzhalter:'; $wb['nagios_url_txt'] = 'Nagios/Check_MK-URL'; -$wb['nagios_user_txt'] = 'Nagios-Benutzer'; -$wb['nagios_password_txt'] = 'Nagios-Passwort'; -$wb['nagios_url_error_regex'] = 'Ungültige Nagios-URL'; -$wb['nagios_url_note_txt'] = 'Platzhalter:'; +$wb['nagios_user_txt'] = 'Nagios/Check_MK-Benutzer'; +$wb['nagios_password_txt'] = 'Nagios/Check_MK-Passwort'; +$wb['nagios_url_error_regex'] = 'Ungültige Nagios/Check_MK-URL'; +$wb['nagios_url_note_txt'] = 'Check_MK wird automatisch erkannt. Platzhalter:'; $wb['backup_dir_is_mount_txt'] = 'Backupverzeichnis ist ein eigener Mount?'; $wb['backup_dir_mount_cmd_txt'] = 'Mount-Befehl, falls Backupverzeichnis nicht gemountet'; $wb['backup_delete_txt'] = 'Backups loeschen wenn eine Domain / Webseite geloescht wird'; diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index c464ff96cc..a5b235fd8f 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -199,6 +199,11 @@ $wb['munin_user_txt'] = 'Munin User'; $wb['munin_password_txt'] = 'Munin Password'; $wb['munin_url_error_regex'] = 'Invalid Munin URL'; $wb['munin_url_note_txt'] = 'Placeholder:'; +$wb['nagios_url_txt'] = 'Nagios/Check_MK URL'; +$wb['nagios_user_txt'] = 'Nagios/Check_MK User'; +$wb['nagios_password_txt'] = 'Nagios/Check_MK Password'; +$wb['nagios_url_error_regex'] = 'Invalid Nagios/Check_MK URL'; +$wb['nagios_url_note_txt'] = 'Check_MK is being autodetected. Placeholder:'; $wb["v6_prefix_txt"] = 'IPv6 Prefix'; $wb["vhost_rewrite_v6_txt"] = 'Rewrite IPv6 on Mirror'; $wb["v6_prefix_length"] = 'Prefix too long according to defined IPv6 '; diff --git a/interface/web/admin/templates/server_config_server_edit.htm b/interface/web/admin/templates/server_config_server_edit.htm index 3156ca797a..8775f0e41c 100644 --- a/interface/web/admin/templates/server_config_server_edit.htm +++ b/interface/web/admin/templates/server_config_server_edit.htm @@ -96,6 +96,16 @@
+ +
 {tmpl_var name='nagios_url_note_txt'} [SERVERNAME]
+
+
+ +
+
+ +
+
{tmpl_var name='monitor_system_updates'} diff --git a/interface/web/monitor/show_nagios.php b/interface/web/monitor/show_nagios.php index db17ce4339..93b603694f 100644 --- a/interface/web/monitor/show_nagios.php +++ b/interface/web/monitor/show_nagios.php @@ -56,18 +56,42 @@ if($_SESSION["s"]["user"]["typ"] == 'admin'){ $nagios_url = str_replace('[SERVERNAME]', $_SESSION['monitor']['server_name'], $nagios_url); $nagios_user = trim($server_config['nagios_user']); $nagios_password = trim($server_config['nagios_password']); - $auth_string = ''; - if($nagios_user != ''){ - $auth_string = rawurlencode($nagios_user); - } - if($nagios_user != '' && $nagios_password != ''){ - $auth_string .= ':'.rawurlencode($nagios_password); - } - if($auth_string != '') $auth_string .= '@'; - $nagios_url_parts = parse_url($nagios_url); - - $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : '').(isset($nagios_url_parts['path']) ? $nagios_url_parts['path'] : '').(isset($nagios_url_parts['query']) ? '?' . $nagios_url_parts['query'] : '').(isset($nagios_url_parts['fragment']) ? '#' . $nagios_url_parts['fragment'] : ''); + if (strpos($nagios_url, '/check_mk') !== false) { + //** Check_MK + if($nagios_user != ''){ + $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : ''); + $pathparts = explode('/check_mk', $nagios_url_parts['path'], 2); + $nagios_url .= $pathparts[0].'/check_mk/login.py?_login=1&_password='.rawurlencode($nagios_password).'&_username='.rawurlencode($nagios_user); + if (strlen(@$pathparts[1]) > 0) { + if (substr($pathparts[1], 0, 1) == '/') $pathparts[1] = substr($pathparts[1], 1, strlen($pathparts[1])-1); + $nagios_url .= '&_origtarget='.rawurlencode(str_replace('&', '%3D', str_replace('?', '%3F', $pathparts[1]))); + } + if (isset($nagios_url_parts['query'])) $nagios_url .= '?'.$nagios_url_parts['query']; + + } else { + $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : ''); + $pathparts = explode('/check_mk', $nagios_url_parts['path'], 2); + $nagios_url .= $pathparts[0].'/check_mk/login.py'; + if (strlen(@$pathparts[1]) > 0) { + if (substr($pathparts[1], 0, 1) == '/') $pathparts[1] = substr($pathparts[1], 1, strlen($pathparts[1])-1); + $nagios_url .= '?_origtarget='.rawurlencode(str_replace('&', '%3D', str_replace('?', '%3F', $pathparts[1]))); + } + if (isset($nagios_url_parts['query'])) $nagios_url .= '?'.$nagios_url_parts['query']; + } + + } else { + //** Nagios + $auth_string = ''; + if($nagios_user != ''){ + $auth_string = rawurlencode($nagios_user); + } + if($nagios_user != '' && $nagios_password != ''){ + $auth_string .= ':'.rawurlencode($nagios_password); + } + if($auth_string != '') $auth_string .= '@'; + $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : '').(isset($nagios_url_parts['path']) ? $nagios_url_parts['path'] : '').(isset($nagios_url_parts['query']) ? '?' . $nagios_url_parts['query'] : '').(isset($nagios_url_parts['fragment']) ? '#' . $nagios_url_parts['fragment'] : ''); + } $app->tpl->setVar("nagios_url", $nagios_url); } else { -- GitLab From ca7e9612ab20e7e9b7b78dd25c6ef83b70919b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Fri, 2 Sep 2016 10:22:38 +0200 Subject: [PATCH 010/302] began implementing nagios connectors (Part 1: Viewing Nagios Info in ISPC) --- interface/web/monitor/lib/module.conf.php | 5 ++ interface/web/monitor/show_nagios.php | 82 +++++++++++++++++++ .../web/monitor/templates/show_nagios.htm | 12 +++ 3 files changed, 99 insertions(+) create mode 100644 interface/web/monitor/show_nagios.php create mode 100644 interface/web/monitor/templates/show_nagios.htm diff --git a/interface/web/monitor/lib/module.conf.php b/interface/web/monitor/lib/module.conf.php index cd84ff3b1a..5b35053dc6 100644 --- a/interface/web/monitor/lib/module.conf.php +++ b/interface/web/monitor/lib/module.conf.php @@ -121,6 +121,11 @@ $items[] = array( 'title' => "Show Services", 'target' => 'content', 'link' => 'monitor/show_data.php?type=services', 'html_id' => 'services'); + +$items[] = array( 'title' => "Show Nagios/Check_MK", + 'target' => 'content', + 'link' => 'monitor/show_nagios.php', + 'html_id' => 'nagios'); $items[] = array( 'title' => "Show Monit", 'target' => 'content', diff --git a/interface/web/monitor/show_nagios.php b/interface/web/monitor/show_nagios.php new file mode 100644 index 0000000000..db17ce4339 --- /dev/null +++ b/interface/web/monitor/show_nagios.php @@ -0,0 +1,82 @@ +auth->check_module_permissions('monitor'); + +$app->uses('tools_monitor'); + +// Loading the template +$app->uses('tpl'); +$app->tpl->newTemplate("form.tpl.htm"); +$app->tpl->setInclude('content_tpl', 'templates/show_nagios.htm'); + +$monTransSrv = $app->lng("monitor_settings_server_txt"); +$title = 'Nagios ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + +$app->tpl->setVar("list_head_txt", $title); + +if($_SESSION["s"]["user"]["typ"] == 'admin'){ + + $app->uses('getconf'); + $server_config = $app->getconf->get_server_config($_SESSION['monitor']['server_id'], 'server'); + + $nagios_url = trim($server_config['nagios_url']); + if($nagios_url != ''){ + $nagios_url = str_replace('[SERVERNAME]', $_SESSION['monitor']['server_name'], $nagios_url); + $nagios_user = trim($server_config['nagios_user']); + $nagios_password = trim($server_config['nagios_password']); + $auth_string = ''; + if($nagios_user != ''){ + $auth_string = rawurlencode($nagios_user); + } + if($nagios_user != '' && $nagios_password != ''){ + $auth_string .= ':'.rawurlencode($nagios_password); + } + if($auth_string != '') $auth_string .= '@'; + + $nagios_url_parts = parse_url($nagios_url); + + $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : '').(isset($nagios_url_parts['path']) ? $nagios_url_parts['path'] : '').(isset($nagios_url_parts['query']) ? '?' . $nagios_url_parts['query'] : '').(isset($nagios_url_parts['fragment']) ? '#' . $nagios_url_parts['fragment'] : ''); + + $app->tpl->setVar("nagios_url", $nagios_url); + } else { + $app->tpl->setVar("no_nagios_url_defined_txt", $app->lng("no_nagios_url_defined_txt")); + } +} else { + $app->tpl->setVar("no_permissions_to_view_nagios_txt", $app->lng("no_permissions_to_view_nagios_txt")); +} + +$app->tpl_defaults(); +$app->tpl->pparse(); +?> diff --git a/interface/web/monitor/templates/show_nagios.htm b/interface/web/monitor/templates/show_nagios.htm new file mode 100644 index 0000000000..0388cb7c65 --- /dev/null +++ b/interface/web/monitor/templates/show_nagios.htm @@ -0,0 +1,12 @@ + +

+ +
+ + + +

ERROR

  1. {tmpl_var name="no_nagios_url_defined_txt"} {tmpl_var name="no_permissions_to_view_nagios_txt"}
+
+
\ No newline at end of file -- GitLab From 22b7f8420ace00c56ec713e0a0acd251ea3b0512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Fri, 2 Sep 2016 10:44:20 +0200 Subject: [PATCH 011/302] first test for nagios view --- .../web/admin/form/server_config.tform.php | 28 +++++++++++++++++++ .../web/admin/lib/lang/de_server_config.lng | 5 ++++ 2 files changed, 33 insertions(+) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 9343084d04..b74af114b4 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -357,6 +357,34 @@ $form["tabs"]['server'] = array( 'width' => '40', 'maxlength' => '255' ), + 'nagios_url' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'validators' => array ( 0 => array ( 'type' => 'REGEX', + 'regex' => '/^((?:http|https)(?::\\/{2}[\\w]+)(?:[\\/|\\.]?)(?:[^\\s"]*))$/', + 'errmsg'=> 'nagios_url_error_regex'), + ), + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'nagios_user' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'nagios_password' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), 'monitor_system_updates' => array( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index 06384d5e32..a45258e980 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -198,6 +198,11 @@ $wb['munin_user_txt'] = 'Munin-Benutzer'; $wb['munin_password_txt'] = 'Munin-Passwort'; $wb['munin_url_error_regex'] = 'Ungültige Munin-URL'; $wb['munin_url_note_txt'] = 'Platzhalter:'; +$wb['nagios_url_txt'] = 'Nagios/Check_MK-URL'; +$wb['nagios_user_txt'] = 'Nagios-Benutzer'; +$wb['nagios_password_txt'] = 'Nagios-Passwort'; +$wb['nagios_url_error_regex'] = 'Ungültige Nagios-URL'; +$wb['nagios_url_note_txt'] = 'Platzhalter:'; $wb['backup_dir_is_mount_txt'] = 'Backupverzeichnis ist ein eigener Mount?'; $wb['backup_dir_mount_cmd_txt'] = 'Mount-Befehl, falls Backupverzeichnis nicht gemountet'; $wb['backup_delete_txt'] = 'Backups loeschen wenn eine Domain / Webseite geloescht wird'; -- GitLab From 6dd5d8b717d4ad89c3554a356c4fb1f46c245c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Fri, 2 Sep 2016 11:59:28 +0200 Subject: [PATCH 012/302] added language vars for nagios, addad check_mk authentication mechanism. Known Bugs: CMK-URL is damaged (origtarget), iframe stays white...? --- .../web/admin/form/server_config.tform.php | 2 +- .../web/admin/lib/lang/de_server_config.lng | 8 ++-- .../web/admin/lib/lang/en_server_config.lng | 5 ++ .../templates/server_config_server_edit.htm | 10 ++++ interface/web/monitor/show_nagios.php | 46 ++++++++++++++----- 5 files changed, 55 insertions(+), 16 deletions(-) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index b74af114b4..961a812a84 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -362,7 +362,7 @@ $form["tabs"]['server'] = array( 'formtype' => 'TEXT', 'default' => '', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^((?:http|https)(?::\\/{2}[\\w]+)(?:[\\/|\\.]?)(?:[^\\s"]*))$/', + 'regex' => '/(^$)|(^((?:http|https)(?::\\/{2}[\\w]+)(?:[\\/|\\.]?)(?:[^\\s"]*))$)/', 'errmsg'=> 'nagios_url_error_regex'), ), 'value' => '', diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index a45258e980..502c4c387d 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -199,10 +199,10 @@ $wb['munin_password_txt'] = 'Munin-Passwort'; $wb['munin_url_error_regex'] = 'Ungültige Munin-URL'; $wb['munin_url_note_txt'] = 'Platzhalter:'; $wb['nagios_url_txt'] = 'Nagios/Check_MK-URL'; -$wb['nagios_user_txt'] = 'Nagios-Benutzer'; -$wb['nagios_password_txt'] = 'Nagios-Passwort'; -$wb['nagios_url_error_regex'] = 'Ungültige Nagios-URL'; -$wb['nagios_url_note_txt'] = 'Platzhalter:'; +$wb['nagios_user_txt'] = 'Nagios/Check_MK-Benutzer'; +$wb['nagios_password_txt'] = 'Nagios/Check_MK-Passwort'; +$wb['nagios_url_error_regex'] = 'Ungültige Nagios/Check_MK-URL'; +$wb['nagios_url_note_txt'] = 'Check_MK wird automatisch erkannt. Platzhalter:'; $wb['backup_dir_is_mount_txt'] = 'Backupverzeichnis ist ein eigener Mount?'; $wb['backup_dir_mount_cmd_txt'] = 'Mount-Befehl, falls Backupverzeichnis nicht gemountet'; $wb['backup_delete_txt'] = 'Backups loeschen wenn eine Domain / Webseite geloescht wird'; diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index c464ff96cc..a5b235fd8f 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -199,6 +199,11 @@ $wb['munin_user_txt'] = 'Munin User'; $wb['munin_password_txt'] = 'Munin Password'; $wb['munin_url_error_regex'] = 'Invalid Munin URL'; $wb['munin_url_note_txt'] = 'Placeholder:'; +$wb['nagios_url_txt'] = 'Nagios/Check_MK URL'; +$wb['nagios_user_txt'] = 'Nagios/Check_MK User'; +$wb['nagios_password_txt'] = 'Nagios/Check_MK Password'; +$wb['nagios_url_error_regex'] = 'Invalid Nagios/Check_MK URL'; +$wb['nagios_url_note_txt'] = 'Check_MK is being autodetected. Placeholder:'; $wb["v6_prefix_txt"] = 'IPv6 Prefix'; $wb["vhost_rewrite_v6_txt"] = 'Rewrite IPv6 on Mirror'; $wb["v6_prefix_length"] = 'Prefix too long according to defined IPv6 '; diff --git a/interface/web/admin/templates/server_config_server_edit.htm b/interface/web/admin/templates/server_config_server_edit.htm index 3156ca797a..8775f0e41c 100644 --- a/interface/web/admin/templates/server_config_server_edit.htm +++ b/interface/web/admin/templates/server_config_server_edit.htm @@ -96,6 +96,16 @@
+ +
 {tmpl_var name='nagios_url_note_txt'} [SERVERNAME]
+
+
+ +
+
+ +
+
{tmpl_var name='monitor_system_updates'} diff --git a/interface/web/monitor/show_nagios.php b/interface/web/monitor/show_nagios.php index db17ce4339..93b603694f 100644 --- a/interface/web/monitor/show_nagios.php +++ b/interface/web/monitor/show_nagios.php @@ -56,18 +56,42 @@ if($_SESSION["s"]["user"]["typ"] == 'admin'){ $nagios_url = str_replace('[SERVERNAME]', $_SESSION['monitor']['server_name'], $nagios_url); $nagios_user = trim($server_config['nagios_user']); $nagios_password = trim($server_config['nagios_password']); - $auth_string = ''; - if($nagios_user != ''){ - $auth_string = rawurlencode($nagios_user); - } - if($nagios_user != '' && $nagios_password != ''){ - $auth_string .= ':'.rawurlencode($nagios_password); - } - if($auth_string != '') $auth_string .= '@'; - $nagios_url_parts = parse_url($nagios_url); - - $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : '').(isset($nagios_url_parts['path']) ? $nagios_url_parts['path'] : '').(isset($nagios_url_parts['query']) ? '?' . $nagios_url_parts['query'] : '').(isset($nagios_url_parts['fragment']) ? '#' . $nagios_url_parts['fragment'] : ''); + if (strpos($nagios_url, '/check_mk') !== false) { + //** Check_MK + if($nagios_user != ''){ + $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : ''); + $pathparts = explode('/check_mk', $nagios_url_parts['path'], 2); + $nagios_url .= $pathparts[0].'/check_mk/login.py?_login=1&_password='.rawurlencode($nagios_password).'&_username='.rawurlencode($nagios_user); + if (strlen(@$pathparts[1]) > 0) { + if (substr($pathparts[1], 0, 1) == '/') $pathparts[1] = substr($pathparts[1], 1, strlen($pathparts[1])-1); + $nagios_url .= '&_origtarget='.rawurlencode(str_replace('&', '%3D', str_replace('?', '%3F', $pathparts[1]))); + } + if (isset($nagios_url_parts['query'])) $nagios_url .= '?'.$nagios_url_parts['query']; + + } else { + $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : ''); + $pathparts = explode('/check_mk', $nagios_url_parts['path'], 2); + $nagios_url .= $pathparts[0].'/check_mk/login.py'; + if (strlen(@$pathparts[1]) > 0) { + if (substr($pathparts[1], 0, 1) == '/') $pathparts[1] = substr($pathparts[1], 1, strlen($pathparts[1])-1); + $nagios_url .= '?_origtarget='.rawurlencode(str_replace('&', '%3D', str_replace('?', '%3F', $pathparts[1]))); + } + if (isset($nagios_url_parts['query'])) $nagios_url .= '?'.$nagios_url_parts['query']; + } + + } else { + //** Nagios + $auth_string = ''; + if($nagios_user != ''){ + $auth_string = rawurlencode($nagios_user); + } + if($nagios_user != '' && $nagios_password != ''){ + $auth_string .= ':'.rawurlencode($nagios_password); + } + if($auth_string != '') $auth_string .= '@'; + $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : '').(isset($nagios_url_parts['path']) ? $nagios_url_parts['path'] : '').(isset($nagios_url_parts['query']) ? '?' . $nagios_url_parts['query'] : '').(isset($nagios_url_parts['fragment']) ? '#' . $nagios_url_parts['fragment'] : ''); + } $app->tpl->setVar("nagios_url", $nagios_url); } else { -- GitLab From bf4f0a5158e7dfba456d6a89f53fd08938beabdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Fri, 2 Sep 2016 13:55:32 +0200 Subject: [PATCH 013/302] nagios viewer working --- interface/web/monitor/lib/lang/de.lng | 4 ++++ interface/web/monitor/lib/lang/en.lng | 4 ++++ interface/web/monitor/show_nagios.php | 8 ++++---- interface/web/monitor/templates/show_nagios.htm | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/interface/web/monitor/lib/lang/de.lng b/interface/web/monitor/lib/lang/de.lng index 6a342be1ea..ec5b638212 100644 --- a/interface/web/monitor/lib/lang/de.lng +++ b/interface/web/monitor/lib/lang/de.lng @@ -155,6 +155,10 @@ $wb['no_permissions_to_view_monit_txt'] = 'Sie haben nicht die Berechtigung, auf $wb['Show Munin'] = 'Munin anzeigen'; $wb['no_munin_url_defined_txt'] = 'Keine Munin-URL definiert.'; $wb['no_permissions_to_view_munin_txt'] = 'Sie haben nicht die Berechtigung, auf Munin zuzugreifen.'; +$wb['Show Nagios/Check_MK'] = 'Nagios/Check_MK anzeigen'; +$wb['no_nagios_url_defined_txt'] = 'Keine Nagios-URL definiert.'; +$wb['no_permissions_to_view_nagios_txt'] = 'Sie haben nicht die Berechtigung, auf Nagios bzw. Check_MK zuzugreifen.'; +$wb['go_to_nagios_txt'] = 'Diese Anzeige in einem eigenen Fenster öffnen'; $wb['no_data_database_size_txt'] = 'Derzeit stehen keine Daten über die Speicherverbrauch der Datenbanken zur Verfügung. Bitte später erneut Ãrüfen..'; $wb['monitor_database_name_txt'] = 'Database'; $wb['monitor_database_size_txt'] = 'Size'; diff --git a/interface/web/monitor/lib/lang/en.lng b/interface/web/monitor/lib/lang/en.lng index aa6472e580..c76caefbce 100644 --- a/interface/web/monitor/lib/lang/en.lng +++ b/interface/web/monitor/lib/lang/en.lng @@ -160,4 +160,8 @@ $wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.' $wb['Show Munin'] = 'Show Munin'; $wb['no_munin_url_defined_txt'] = 'No Munin URL defined.'; $wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.'; +$wb['Show Nagios/Check_MK'] = 'Show Nagios'; +$wb['no_nagios_url_defined_txt'] = 'No Nagios URL defined.'; +$wb['no_permissions_to_view_nagios_txt'] = 'You are not allowed to access Nagios/Check_MK.'; +$wb['go_to_nagios_txt'] = 'Open a new window containing this view'; ?> diff --git a/interface/web/monitor/show_nagios.php b/interface/web/monitor/show_nagios.php index 93b603694f..736e80b1b0 100644 --- a/interface/web/monitor/show_nagios.php +++ b/interface/web/monitor/show_nagios.php @@ -65,9 +65,9 @@ if($_SESSION["s"]["user"]["typ"] == 'admin'){ $nagios_url .= $pathparts[0].'/check_mk/login.py?_login=1&_password='.rawurlencode($nagios_password).'&_username='.rawurlencode($nagios_user); if (strlen(@$pathparts[1]) > 0) { if (substr($pathparts[1], 0, 1) == '/') $pathparts[1] = substr($pathparts[1], 1, strlen($pathparts[1])-1); - $nagios_url .= '&_origtarget='.rawurlencode(str_replace('&', '%3D', str_replace('?', '%3F', $pathparts[1]))); + $nagios_url .= '&_origtarget='.rawurlencode($pathparts[1]); } - if (isset($nagios_url_parts['query'])) $nagios_url .= '?'.$nagios_url_parts['query']; + if (isset($nagios_url_parts['query'])) $nagios_url .= '?'.rawurlencode($nagios_url_parts['query']); } else { $nagios_url = $nagios_url_parts['scheme'].'://'.$auth_string.$nagios_url_parts['host'].(isset($nagios_url_parts['port']) ? ':' . $nagios_url_parts['port'] : ''); @@ -75,9 +75,9 @@ if($_SESSION["s"]["user"]["typ"] == 'admin'){ $nagios_url .= $pathparts[0].'/check_mk/login.py'; if (strlen(@$pathparts[1]) > 0) { if (substr($pathparts[1], 0, 1) == '/') $pathparts[1] = substr($pathparts[1], 1, strlen($pathparts[1])-1); - $nagios_url .= '?_origtarget='.rawurlencode(str_replace('&', '%3D', str_replace('?', '%3F', $pathparts[1]))); + $nagios_url .= '?_origtarget='.rawurlencode($pathparts[1]); } - if (isset($nagios_url_parts['query'])) $nagios_url .= '?'.$nagios_url_parts['query']; + if (isset($nagios_url_parts['query'])) $nagios_url .= '?'.rawurlencode($nagios_url_parts['query']); } } else { diff --git a/interface/web/monitor/templates/show_nagios.htm b/interface/web/monitor/templates/show_nagios.htm index 0388cb7c65..0c2b99fde6 100644 --- a/interface/web/monitor/templates/show_nagios.htm +++ b/interface/web/monitor/templates/show_nagios.htm @@ -5,6 +5,7 @@
+ {tmpl_var name="go_to_nagios_txt"}

ERROR

  1. {tmpl_var name="no_nagios_url_defined_txt"} {tmpl_var name="no_permissions_to_view_nagios_txt"}
-- GitLab From 3daf08e11b8dc86a023bc05d81709586f9503352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Fri, 2 Sep 2016 14:03:22 +0200 Subject: [PATCH 014/302] removed the new windows link as language var does not work (not so important as CMK has its own...) --- interface/web/monitor/templates/show_nagios.htm | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/web/monitor/templates/show_nagios.htm b/interface/web/monitor/templates/show_nagios.htm index 0c2b99fde6..0388cb7c65 100644 --- a/interface/web/monitor/templates/show_nagios.htm +++ b/interface/web/monitor/templates/show_nagios.htm @@ -5,7 +5,6 @@
- {tmpl_var name="go_to_nagios_txt"}

ERROR

  1. {tmpl_var name="no_nagios_url_defined_txt"} {tmpl_var name="no_permissions_to_view_nagios_txt"}
-- GitLab From ec2350fed0c5f1504ea22abcab71c39e4ed531db Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 13:35:29 +0200 Subject: [PATCH 015/302] Renamed param with a more consistent name --- install/tpl/server.ini.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 53c5390d02..66bc493e9d 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -54,7 +54,7 @@ overquota_notify_client=y overquota_notify_freq=7 overquota_notify_onok=n sendmail_path=/usr/sbin/sendmail -mailinglist=mlmmj +mailinglist_manager=mlmmj [getmail] getmail_config_dir=/etc/getmail -- GitLab From a25e52fc395e03e0f41ce8773b11e062e7e62a6e Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 13:35:47 +0200 Subject: [PATCH 016/302] Replaced wrong path --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index ff2f4ba3e2..788d251436 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -877,7 +877,7 @@ class installer_base { copy($conf['postfix']['config_dir'].'/master.cf', $conf['postfix']['config_dir'].'/master.cf~mlmmj'); $content .= "\n# mlmmj mailing lists\n"; $content .= "mlmmj unix - n n - - pipe\n"; - $content .= " flags=ORhu user=mlmmj argv=/usr/local/bin/mlmmj-receive -F -L /var/spool/mlmmj/\$nexthop\n\n"; + $content .= " flags=ORhu user=mlmmj argv=/usr/bin/mlmmj-receive -F -L /var/spool/mlmmj/\$nexthop\n\n"; wf($conf['postfix']['config_dir'].'/master.cf', $content); } -- GitLab From 5c6003371561d638dbe8be1236caff29c111fe08 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 13:36:03 +0200 Subject: [PATCH 017/302] Updated mail_mailinglist table with some mlmmj fields --- install/sql/incremental/upd_0084.sql | 11 +++++++++++ install/sql/ispconfig3.sql | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 install/sql/incremental/upd_0084.sql diff --git a/install/sql/incremental/upd_0084.sql b/install/sql/incremental/upd_0084.sql new file mode 100644 index 0000000000..ca8ffd09a3 --- /dev/null +++ b/install/sql/incremental/upd_0084.sql @@ -0,0 +1,11 @@ +ALTER TABLE `mail_mailinglist` ADD `list_type` enum('open','closed') NOT NULL DEFAULT 'open'; +ALTER TABLE `mail_mailinglist` ADD `subject_prefix` varchar(50) NOT NULL DEFAULT ''; +ALTER TABLE `mail_mailinglist` ADD `admins` mediumtext; +ALTER TABLE `mail_mailinglist` ADD `digestinterval` int(11) NOT NULL DEFAULT '7'; +ALTER TABLE `mail_mailinglist` ADD `digestmaxmails` int(11) NOT NULL DEFAULT '50'; +ALTER TABLE `mail_mailinglist` ADD `archive` enum('n','y') NOT NULL DEFAULT 'n'; +ALTER TABLE `mail_mailinglist` ADD `digesttext` ENUM('n','y') NOT NULL DEFAULT 'n'; +ALTER TABLE `mail_mailinglist` ADD `digestsub` ENUM('n','y') NOT NULL DEFAULT 'n'; +ALTER TABLE `mail_mailinglist` ADD `mail_footer` mediumtext; +ALTER TABLE `mail_mailinglist` ADD `subscribe_policy` enum('disabled','confirm','approval','both','none') NOT NULL DEFAULT 'confirm'; +ALTER TABLE `mail_mailinglist` ADD `posting_policy` enum('closed','moderated','free') NOT NULL DEFAULT 'free'; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index eaf060a8a8..0b67dfb2b5 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -877,8 +877,19 @@ CREATE TABLE `mail_mailinglist` ( `server_id` int(11) unsigned NOT NULL default '0', `domain` varchar(255) NOT NULL DEFAULT '', `listname` varchar(255) NOT NULL DEFAULT '', + `list_type` enum('open','closed') NOT NULL DEFAULT 'open', `email` varchar(255) NOT NULL DEFAULT '', `password` varchar(255) NOT NULL DEFAULT '', + `subject_prefix` varchar(50) NOT NULL DEFAULT '', + `admins` mediumtext, + `digestinterval` int(11) NOT NULL DEFAULT '7', + `digestmaxmails` int(11) NOT NULL DEFAULT '50', + `archive` enum('n','y') NOT NULL DEFAULT 'n', + `digesttext` enum('n','y') NOT NULL DEFAULT 'n', + `digestsub` enum('n','y') NOT NULL DEFAULT 'n', + `mail_footer` mediumtext, + `subscribe_policy` enum('disabled','confirm','approval','both','none') NOT NULL DEFAULT 'confirm', + `posting_policy` enum('closed','moderated','free') NOT NULL DEFAULT 'free', PRIMARY KEY (`mailinglist_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- GitLab From 585fce95e6a69a75891681e547f43a5031020098 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 13:36:46 +0200 Subject: [PATCH 018/302] Implemented first version of mlmmj config panel Subscription and removal tab doesn't works yet... --- .../web/mail/form/mail_mailinglist.tform.php | 148 ++++++++++++++++++ .../web/mail/lib/lang/en_mail_mailinglist.lng | 72 ++++++++- .../templates/mail_mailinglist_digest.htm | 48 ++++++ .../mail/templates/mail_mailinglist_edit.htm | 3 +- .../templates/mail_mailinglist_membership.htm | 65 ++++++++ .../templates/mail_mailinglist_options.htm | 38 +++++ .../templates/mail_mailinglist_privacy.htm | 44 ++++++ 7 files changed, 416 insertions(+), 2 deletions(-) create mode 100644 interface/web/mail/templates/mail_mailinglist_digest.htm create mode 100644 interface/web/mail/templates/mail_mailinglist_membership.htm create mode 100644 interface/web/mail/templates/mail_mailinglist_options.htm create mode 100644 interface/web/mail/templates/mail_mailinglist_privacy.htm diff --git a/interface/web/mail/form/mail_mailinglist.tform.php b/interface/web/mail/form/mail_mailinglist.tform.php index 24c4f003c9..66337f4535 100644 --- a/interface/web/mail/form/mail_mailinglist.tform.php +++ b/interface/web/mail/form/mail_mailinglist.tform.php @@ -38,6 +38,9 @@ */ +$app->uses('getconf'); +$mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; + $form["title"] = "Mailing List"; $form["description"] = ""; $form["name"] = "mail_mailinglist"; @@ -151,4 +154,149 @@ $form["tabs"]['mailinglist'] = array ( //################################# ) ); + +if($mlManager == 'mlmmj') { + $form["tabs"]['options'] = array ( + 'title' => "Options", + 'width' => 100, + 'template' => "templates/mail_mailinglist_options.htm", + 'fields' => array ( + //################################# + // Begin Datatable fields + //################################# + 'admins' => array ( + 'datatype' => 'TEXT', + 'formtype' => 'TEXTAREA', + 'cols' => '30', + 'rows' => '5' + ), + 'subject_prefix' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255', + ), + 'mail_footer' => array ( + 'datatype' => 'TEXT', + 'formtype' => 'TEXTAREA', + 'cols' => '30', + 'rows' => '5' + ), + 'archive' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + ) + ); + + $form["tabs"]['membership'] = array ( + 'title' => "Membership", + 'width' => 100, + 'template' => "templates/mail_mailinglist_membership.htm", + 'fields' => array ( + //################################# + // Begin Datatable fields + //################################# +// 'membership' => array ( +// 'datatype' => 'TEXT', +// 'formtype' => 'TEXTAREA', +// 'cols' => '30', +// 'rows' => '5' +// ), + ) + ); + + + $form["tabs"]['privacy'] = array ( + 'title' => "Privacy", + 'width' => 100, + 'template' => "templates/mail_mailinglist_privacy.htm", + 'fields' => array ( + //################################# + // Begin Datatable fields + //################################# + 'list_type' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'RADIO', + 'regex' => '', + 'errmsg' => '', + 'default' => 'user', + 'value' => array ('open' => 'Open', 'closed' => 'Closed'), + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '' + ), + 'subscribe_policy' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'default' => 'confirm', + 'value' => array( + 'disabled' => 'sub_disabled_txt', + 'confirm' => 'sub_confirm_txt', + 'approval' => 'sub_approval_txt', + 'both' => 'sub_both_txt', + 'none' => 'sub_none_txt'), + ), + 'posting_policy' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'default' => 'confirm', + 'value' => array( + 'closed' => 'post_closed_txt', + 'moderated' => 'post_moderated_txt', + 'free' => 'post_free_txt'), + ), + ) + ); + + $form["tabs"]['digest'] = array ( + 'title' => "Digest", + 'width' => 100, + 'template' => "templates/mail_mailinglist_digest.htm", + 'fields' => array ( + //################################# + // Begin Datatable fields + //################################# + 'digesttext' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'digestsub' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'digestinterval' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '7', + 'validators' => array(0 => array('type' => 'ISINT'), + array('type'=>'RANGE', 'range'=>'1:60') + ), + 'value' => '', + 'width' => '15' + ), + 'digestmaxmails' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '50', + 'validators' => array(0 => array('type' => 'ISINT'), + array('type'=>'RANGE', 'range'=>'10:100') + ), + 'value' => '', + 'width' => '15' + ), + ) + ); + +} ?> diff --git a/interface/web/mail/lib/lang/en_mail_mailinglist.lng b/interface/web/mail/lib/lang/en_mail_mailinglist.lng index f78da02da9..6e9e7c4019 100644 --- a/interface/web/mail/lib/lang/en_mail_mailinglist.lng +++ b/interface/web/mail/lib/lang/en_mail_mailinglist.lng @@ -1,4 +1,74 @@ \ No newline at end of file diff --git a/interface/web/mail/templates/mail_mailinglist_digest.htm b/interface/web/mail/templates/mail_mailinglist_digest.htm new file mode 100644 index 0000000000..57a2c1c667 --- /dev/null +++ b/interface/web/mail/templates/mail_mailinglist_digest.htm @@ -0,0 +1,48 @@ + +

+Digest + +
+ +
+ {tmpl_var name='digestsub'} +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ {tmpl_var name='digesttext'} +
+
+ + + +
+ + +
+ + diff --git a/interface/web/mail/templates/mail_mailinglist_edit.htm b/interface/web/mail/templates/mail_mailinglist_edit.htm index 9d6f8bdde6..1167e1b56f 100644 --- a/interface/web/mail/templates/mail_mailinglist_edit.htm +++ b/interface/web/mail/templates/mail_mailinglist_edit.htm @@ -54,6 +54,7 @@
+
@@ -81,7 +82,7 @@
- +
diff --git a/interface/web/mail/templates/mail_mailinglist_membership.htm b/interface/web/mail/templates/mail_mailinglist_membership.htm new file mode 100644 index 0000000000..2d3e012e5d --- /dev/null +++ b/interface/web/mail/templates/mail_mailinglist_membership.htm @@ -0,0 +1,65 @@ + +

+ +Membership management + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ + + +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_mailinglist_options.htm b/interface/web/mail/templates/mail_mailinglist_options.htm new file mode 100644 index 0000000000..9d0489a165 --- /dev/null +++ b/interface/web/mail/templates/mail_mailinglist_options.htm @@ -0,0 +1,38 @@ + +

+ +General Options +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ {tmpl_var name='archive'} +
+
+ + + +
+ + +
+ diff --git a/interface/web/mail/templates/mail_mailinglist_privacy.htm b/interface/web/mail/templates/mail_mailinglist_privacy.htm new file mode 100644 index 0000000000..63fe167ade --- /dev/null +++ b/interface/web/mail/templates/mail_mailinglist_privacy.htm @@ -0,0 +1,44 @@ + +

+Privacy + +
+ +
+ {tmpl_var name='list_type'} +
+
+ +
+ +
+
+ +
+ +
+
+ + + +
+ + +
+ + \ No newline at end of file -- GitLab From 5a4d783dd1b255e27cdde6e25b9e438555fb9c89 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 13:37:04 +0200 Subject: [PATCH 019/302] Implemented plugin update method Some minor bugs fixed too --- server/plugins-available/mlmmj_plugin.inc.php | 266 ++++++++++-------- 1 file changed, 153 insertions(+), 113 deletions(-) diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php index bbb21eeb4a..6a94cb6d03 100644 --- a/server/plugins-available/mlmmj_plugin.inc.php +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -43,9 +43,10 @@ mail_mailinglist_del.php */ class mlmmj_plugin { - const ML_ALIAS = 0; - const ML_TRANSPORT = 1; - const ML_VIRTUAL = 2; + const ML_ALIAS = 0; + const ML_TRANSPORT = 1; + const ML_VIRTUAL = 2; + const SECONDS_IN_DAY = 86400; private $plugin_name = 'mlmmj_plugin'; private $class_name = 'mlmmj_plugin'; @@ -73,123 +74,158 @@ class mlmmj_plugin { } function insert($event_name, $data) { - global $app; + global $app, $conf; - /*[new] => Array - ( - [mailinglist_id] => 8 - [sys_userid] => 1 - [sys_groupid] => 26 - [sys_perm_user] => riud - [sys_perm_group] => ru - [sys_perm_other] => - [server_id] => 0 - [domain] => 10100.to - [listname] => merda - [email] => michele@10100.to - [password] => vbhXvWMK!1 - )*/ - - $mlConf = $this->getMlConfig(); - $listDomain = $data['new']['domain']; - $listName = $data['new']['listname']; - $listDir = $mlConf['spool_dir']."/$listDomain/$listName"; - $lang = 'en'; - $owner = $data['new']['email']; - - // Creating ML directories structure - mkdir("$listDir/incoming", 0755, true); - mkdir("$listDir/queue/discarded", 0755, true); - mkdir("$listDir/archive", 0755, true); - mkdir("$listDir/text", 0755, true); - mkdir("$listDir/subconf", 0755, true); - mkdir("$listDir/unsubconf", 0755, true); - mkdir("$listDir/bounce", 0755, true); - mkdir("$listDir/control", 0755, true); - mkdir("$listDir/moderation", 0755, true); - mkdir("$listDir/subscribers.d", 0755, true); - mkdir("$listDir/digesters.d", 0755, true); - mkdir("$listDir/requeue", 0755, true); - mkdir("$listDir/nomailsubs.d", 0755, true); - - // Creating ML index file - touch("$listDir/index"); - - // Saving ML base data - file_put_contents("$listDir/control/owner", $owner); - file_put_contents("$listDir/control/listaddress", "$listName@$listDomain"); - - // Copying language translations - if(!is_dir("/usr/share/mlmmj/text.skel/$lang")) $lang = 'en'; - foreach (glob("/usr/share/mlmmj/text.skel/$lang/*") as $filename) - copy($filename, "$listDir/text/".basename($filename)); - - // The mailinglist directory have to be owned by the user running the mailserver - $this->chmodR($listDir); - - // Creating alias entry - $this->addMapEntry("$listName: \"|/usr/bin/mlmmj-recieve -L $listDir/\"", self::ML_ALIAS); - - // Creating transport entry - $this->addMapEntry("$listDomain--$listName@localhost.mlmmj mlmmj:$listDomain/$listName", self::ML_TRANSPORT); - - // Creating virtual entry - $this->addMapEntry("$listName@$listDomain $listDomain--$listName@localhost.mlmmj", self::ML_VIRTUAL); - - $mlmmjmaintd='/usr/bin/mlmmj-maintd'; -// CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$FQDN/$LISTNAME/\"" - -// /usr/sbin/postfix reload - $app->db->query("UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = ".$app->db->quote($data["new"]['mailinglist_id'])); + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist']; + + if($mlManager == 'mlmmj') { + $mlConf = $this->getMlConfig(); + $rec = $data['new']; + $listDomain = $rec['domain']; + $listName = $rec['listname']; + $listDir = $mlConf['spool_dir']."/$listDomain/$listName"; + $lang = 'en'; + $owner = $rec['email']; + + // Creating ML directories structure + mkdir("$listDir/incoming", 0755, true); + mkdir("$listDir/queue/discarded", 0755, true); + mkdir("$listDir/archive", 0755, true); + mkdir("$listDir/text", 0755, true); + mkdir("$listDir/subconf", 0755, true); + mkdir("$listDir/unsubconf", 0755, true); + mkdir("$listDir/bounce", 0755, true); + mkdir("$listDir/control", 0755, true); + mkdir("$listDir/moderation", 0755, true); + mkdir("$listDir/subscribers.d", 0755, true); + mkdir("$listDir/digesters.d", 0755, true); + mkdir("$listDir/requeue", 0755, true); + mkdir("$listDir/nomailsubs.d", 0755, true); + + // Creating ML index file + touch("$listDir/index"); + + // Creating default control files + // WARNING: Edit this section if default DB values will be modified! + touch("$listDir/control/nodigestsub"); + touch("$listDir/control/noarchive"); + + // Saving ML base data + file_put_contents("$listDir/control/owner", $owner); + file_put_contents("$listDir/control/listaddress", "$listName@$listDomain"); + + // Copying language translations + if(!is_dir("/usr/share/mlmmj/text.skel/$lang")) $lang = 'en'; + foreach (glob("/usr/share/mlmmj/text.skel/$lang/*") as $filename) + copy($filename, "$listDir/text/".basename($filename)); + + // The mailinglist directory have to be owned by the user running the mailserver + $this->changeOwnership($listDir); + + // Creating alias entry + $this->addMapEntry("$listName: \"|/usr/bin/mlmmj-recieve -L $listDir/\"", self::ML_ALIAS); + + // Creating transport entry + $this->addMapEntry("$listDomain--$listName@localhost.mlmmj mlmmj:$listDomain/$listName", self::ML_TRANSPORT); + + // Creating virtual entry + $this->addMapEntry("$listName@$listDomain $listDomain--$listName@localhost.mlmmj", self::ML_VIRTUAL); + + $mlmmjmaintd='/usr/bin/mlmmj-maintd'; + // CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$FQDN/$LISTNAME/\"" + + // /usr/sbin/postfix reload + $app->db->query("UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = ".$app->db->quote($rec['mailinglist_id'])); + } } // The purpose of this plugin is to rewrite the main.cf file function update($event_name, $data) { global $app, $conf; -// $this->update_config(); -// -// if($data["new"]["password"] != $data["old"]["password"] && $data["new"]["password"] != '') { -// exec("nohup /usr/lib/mailman/bin/change_pw -l ".escapeshellcmd($data["new"]["listname"])." -p ".escapeshellcmd($data["new"]["password"])." >/dev/null 2>&1 &"); -// exec('nohup '.$conf['init_scripts'] . '/' . 'mailman reload >/dev/null 2>&1 &'); -// $app->db->query("UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = ".$app->db->quote($data["new"]['mailinglist_id'])); -// } -// -// if(is_file('/var/lib/mailman/data/virtual-mailman')) exec('postmap /var/lib/mailman/data/virtual-mailman'); -// if(is_file('/var/lib/mailman/data/transport-mailman')) exec('postmap /var/lib/mailman/data/transport-mailman'); - } - - function delete($event_name, $data) { - global $app; - - $mlConf = $this->getMlConfig(); - $listDomain = $data['old']['domain']; - $listName = $data['old']['listname']; - $listDir = $mlConf['spool_dir']."/$listDomain/$listName"; - $lang = 'en'; - $owner = $data['old']['email']; - - // Removing alias entry - $this->delMapEntry("$listName: \"|/usr/bin/mlmmj-recieve -L $listDir/\"", self::ML_ALIAS); - - // Removing transport entry - $this->delMapEntry("$listDomain--$listName@localhost.mlmmj mlmmj:$listDomain/$listName", self::ML_TRANSPORT); + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist']; + + if($mlManager == 'mlmmj') { + $rec = $data['new']; + $mlConf = $this->getMlConfig(); + + $controlDir = "{$mlConf['spool_dir']}/{$rec['domain']}/{$rec['listname']}/control"; + + + // Does'nt matter if list is open or close, members can ALWAYS unsubscribe + if($rec['list_type'] == 'open') { + switch($rec['subscribe_policy']) { + case 'disabled': + touch("$controlDir/closedlistsub"); + @unlink("$controlDir/submod"); + @unlink("$controlDir/nosubconfirm"); + break; + case 'both': + touch("$controlDir/submod"); + case 'approval': + touch("$controlDir/nosubconfirm"); + @unlink("$controlDir/closedlistsub"); + break; + case 'none': + touch("$controlDir/nosubconfirm"); + @unlink("$controlDir/closedlistsub"); + break; + case 'confirm': + @unlink("$controlDir/nosubconfirm"); + @unlink("$controlDir/closedlistsub"); + @unlink("$controlDir/submod"); + break; + } + + switch($rec['posting_policy']) { + case 'closed': + touch("$controlDir/subonlypost"); + break; + case 'moderated': + touch("$controlDir/modnonsubposts"); + break; + case 'free': + @unlink("$controlDir/modnonsubposts"); + @unlink("$controlDir/subonlypost"); + break; + } + } elseif($rec['list_type'] == 'closed') { + touch("$controlDir/closedlistsub"); + touch("$controlDir/subonlypost"); + @unlink("$controlDir/modnonsubposts"); + @unlink("$controlDir/submod"); + @unlink("$controlDir/nosubconfirm"); + } - // Removing virtual entry - $this->delMapEntry("$listName@$listDomain $listDomain--$listName@localhost.mlmmj", self::ML_VIRTUAL); + if($rec['digestsub'] == 'y') { + @unlink("$controlDir/nodigestsub"); + if($rec['digesttext'] == 'y') @unlink("$controlDir/nodigesttext"); + else touch("$controlDir/nodigesttext"); + file_put_contents("$controlDir/digestinterval", $rec['digestinterval']*self::SECONDS_IN_DAY); + file_put_contents("$controlDir/digestmaxmails", $rec['digestmaxmails']); + } else { + touch("$controlDir/nodigestsub"); + @unlink("$controlDir/nodigesttext"); + @unlink("$controlDir/digestinterval"); + @unlink("$controlDir/digestmaxmails"); + } + $this->changeOwnership("$controlDir/*"); + } + } - $this->rmdirR($listDir); + function delete($event_name, $data) { + global $app, $conf; - // Remove parent folder if is empty (means there aren't other ML for the domain) - @rmdir($mlConf['spool_dir']."/$listDomain"); + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist']; - $mlmmjmaintd='/usr/bin/mlmmj-maintd'; -// CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$FQDN/$LISTNAME/\"" + if($mlManager == 'mlmmj') { + $a=0; + } } private function getMlConfig() { - $mlConfig = parse_ini_file($this->mlmmj_config_dir.'mlmmj.conf'); + $mlConfig = @parse_ini_file($this->mlmmj_config_dir.'mlmmj.conf'); // Force PHP7 to use # to mark comments if(PHP_MAJOR_VERSION >= 7) @@ -198,16 +234,20 @@ class mlmmj_plugin { return $mlConfig; } - private function chmodR($dir) { - if($objs = glob($dir."/*")) { - foreach($objs as $obj) { - chown($obj, 'mlmmj'); - chgrp($obj, 'mlmmj'); - if(is_dir($obj)) $this->chmodR($obj); + private function changeOwnership($path, $recursive=true) { + if(basename($path) == '*') $path = dirname($path); + + if(is_dir($path)) { + if($objs = glob($path."/*")) { + foreach($objs as $obj) { + chown($obj, 'mlmmj'); + chgrp($obj, 'mlmmj'); + if(is_dir($obj) && $recursive) $this->changeOwnership($obj); + } } } - return chown($dir, 'mlmmj') && chgrp($dir, 'mlmmj'); + return chown($path, 'mlmmj') && chgrp($path, 'mlmmj'); } private function rmdirR($path) { @@ -284,4 +324,4 @@ class mlmmj_plugin { } } // end class -?> +?> \ No newline at end of file -- GitLab From 770fc562a4bce782644f12c45d0e21f7765b029f Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 14:46:04 +0200 Subject: [PATCH 020/302] Fixing bug in server.ini varaible update --- install/lib/installer_base.lib.php | 28 +------------------ .../web/admin/form/server_config.tform.php | 2 +- .../web/admin/lib/lang/en_server_config.lng | 2 ++ .../web/admin/lib/lang/it_server_config.lng | 2 ++ .../templates/server_config_mail_edit.htm | 6 ++-- 5 files changed, 9 insertions(+), 31 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 788d251436..1382065958 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -314,7 +314,7 @@ class installer_base { $tpl_ini_array['web']['php_ini_path_cgi'] = $conf['apache']['php_ini_path_cgi']; $tpl_ini_array['mail']['pop3_imap_daemon'] = ($conf['dovecot']['installed'] == true)?'dovecot':'courier'; $tpl_ini_array['mail']['mail_filter_syntax'] = ($conf['dovecot']['installed'] == true)?'sieve':'maildrop'; - $tpl_ini_array['mail']['mailinglist'] = ($conf['mlmmj']['installed'] == true)?'mlmmj':'mailman'; + $tpl_ini_array['mail']['mailinglist_manager'] = ($conf['mlmmj']['installed'] == true)?'mlmmj':'mailman'; $tpl_ini_array['dns']['bind_user'] = $conf['bind']['bind_user']; $tpl_ini_array['dns']['bind_group'] = $conf['bind']['bind_group']; $tpl_ini_array['dns']['bind_zonefiles_dir'] = $conf['bind']['bind_zonefiles_dir']; @@ -888,32 +888,6 @@ class installer_base { exec("nohup /usr/sbin/postmap $configDir/virtual >/dev/null 2>&1"); touch("$configDir/transport"); exec("nohup /usr/sbin/postmap $configDir/transport >/dev/null 2>&1"); - - // ALTER TABLE `mail_mailinglist` ADD `closedlist` enum('n','y') NOT NULL DEFAULT 'y' - // ALTER TABLE `mail_mailinglist` ADD `closedlistsub` enum('n','y') NOT NULL DEFAULT 'y' - // ALTER TABLE `mail_mailinglist` ADD `moderated` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `tocc` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `subonlypost` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `modonlypost` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `modnonsubposts` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `addtohdr` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `notifysub` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `notifymod` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `noarchive` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nosubconfirm` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `noget` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `notoccdenymails` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `noaccessdenymails` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nosubonlydenymails` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nomodonlydenymails` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nosubmodmails` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nodigesttext` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nodigestsub` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nonomailsub` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nomaxmailsizedenymails` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `nolistsubsemail` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `ifmodsendonlymodmoderate` enum('n','y') NOT NULL DEFAULT 'n' - // ALTER TABLE `mail_mailinglist` ADD `notmetoo` enum('n','y') NOT NULL DEFAULT 'n' } public function get_postfix_service($service, $type) { diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index aff3e061bc..de5904ebcb 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -636,7 +636,7 @@ $form["tabs"]['mail'] = array( 'default' => 'n', 'value' => array(0 => 'n', 1 => 'y') ), - 'mailinglist' => array( + 'mailinglist_manager' => array( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => '20', diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index a5b235fd8f..eb55088eb2 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -289,4 +289,6 @@ $wb['xmpp_port_pastebin_txt'] = 'Pastebin'; $wb['xmpp_port_bosh_txt'] = 'BOSH'; $wb["disable_bind_log_txt"] = "Disable bind9 messages for Loglevel WARN"; $wb["apps_vhost_enabled_txt"] = "Apps-vhost enabled"; + +$wb["mailinglist_manager_txt"] = 'Mailinglist Manager' ?> diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index 0905e87768..6db41c8b7a 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -281,4 +281,6 @@ $wb['xmpp_port_bosh_txt'] = 'BOSH'; $wb['disable_bind_log_txt'] = 'Disable bind9 messages for Loglevel WARN'; $wb['apps_vhost_enabled_txt'] = 'Apps-vhost enabled'; $wb['backup_time_txt'] = 'Backup time'; + +$wb["mailinglist_manager_txt"] = 'Gestore delle Liste' ?> diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm index 78a94f45b3..499a47f598 100644 --- a/interface/web/admin/templates/server_config_mail_edit.htm +++ b/interface/web/admin/templates/server_config_mail_edit.htm @@ -118,9 +118,9 @@
- -
+ {tmpl_var name='mailinglist_manager'}
-- GitLab From 303f7c4108cfeee5fba802ea063e98479532183b Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 15:01:16 +0200 Subject: [PATCH 021/302] Fixing wrong variable name --- server/plugins-available/mlmmj_plugin.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php index 6a94cb6d03..81a278c035 100644 --- a/server/plugins-available/mlmmj_plugin.inc.php +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -76,7 +76,7 @@ class mlmmj_plugin { function insert($event_name, $data) { global $app, $conf; - $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist']; + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; if($mlManager == 'mlmmj') { $mlConf = $this->getMlConfig(); @@ -143,7 +143,7 @@ class mlmmj_plugin { function update($event_name, $data) { global $app, $conf; - $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist']; + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; if($mlManager == 'mlmmj') { $rec = $data['new']; @@ -217,7 +217,7 @@ class mlmmj_plugin { function delete($event_name, $data) { global $app, $conf; - $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist']; + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; if($mlManager == 'mlmmj') { $a=0; -- GitLab From f4719525461dee4e32a9b569b20007becee9cba4 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 16:04:12 +0200 Subject: [PATCH 022/302] Updated maintd cron entry --- install/lib/installer_base.lib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 1382065958..a4802fba33 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -877,7 +877,8 @@ class installer_base { copy($conf['postfix']['config_dir'].'/master.cf', $conf['postfix']['config_dir'].'/master.cf~mlmmj'); $content .= "\n# mlmmj mailing lists\n"; $content .= "mlmmj unix - n n - - pipe\n"; - $content .= " flags=ORhu user=mlmmj argv=/usr/bin/mlmmj-receive -F -L /var/spool/mlmmj/\$nexthop\n\n"; + $content .= " flags=ORhu user=mlmmj argv=/usr/bin/mlmmj-receive -F -L /var/"; + $content .= $mlConfig['spool_dir']."/\$nexthop\n\n"; wf($conf['postfix']['config_dir'].'/master.cf', $content); } @@ -888,6 +889,10 @@ class installer_base { exec("nohup /usr/sbin/postmap $configDir/virtual >/dev/null 2>&1"); touch("$configDir/transport"); exec("nohup /usr/sbin/postmap $configDir/transport >/dev/null 2>&1"); + + //* Create/update cron entry + $cronEntry = 'find /var/'.$mlConfig['spool_dir'].'/ -mindepth 1 -maxdepth 1 -type d -exec /usr/bin/mlmmj-maintd -F -d {} \;' + file_put_contents('/etc/cron.d/mlmmj', $cronEntry); } public function get_postfix_service($service, $type) { -- GitLab From 31784830f07b501cee545286ced1e62c42a43022 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 16:04:46 +0200 Subject: [PATCH 023/302] Cleaning code --- server/plugins-available/mlmmj_plugin.inc.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php index 81a278c035..927d6e3875 100644 --- a/server/plugins-available/mlmmj_plugin.inc.php +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -109,10 +109,9 @@ class mlmmj_plugin { // WARNING: Edit this section if default DB values will be modified! touch("$listDir/control/nodigestsub"); touch("$listDir/control/noarchive"); - - // Saving ML base data file_put_contents("$listDir/control/owner", $owner); file_put_contents("$listDir/control/listaddress", "$listName@$listDomain"); + file_put_contents("$listDir/control/prefix", $listName); // Copying language translations if(!is_dir("/usr/share/mlmmj/text.skel/$lang")) $lang = 'en'; @@ -130,12 +129,6 @@ class mlmmj_plugin { // Creating virtual entry $this->addMapEntry("$listName@$listDomain $listDomain--$listName@localhost.mlmmj", self::ML_VIRTUAL); - - $mlmmjmaintd='/usr/bin/mlmmj-maintd'; - // CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$FQDN/$LISTNAME/\"" - - // /usr/sbin/postfix reload - $app->db->query("UPDATE mail_mailinglist SET password = '' WHERE mailinglist_id = ".$app->db->quote($rec['mailinglist_id'])); } } @@ -151,8 +144,7 @@ class mlmmj_plugin { $controlDir = "{$mlConf['spool_dir']}/{$rec['domain']}/{$rec['listname']}/control"; - - // Does'nt matter if list is open or close, members can ALWAYS unsubscribe + // Doesn't matter if the list is open or close, members can ALWAYS unsubscribe if($rec['list_type'] == 'open') { switch($rec['subscribe_policy']) { case 'disabled': @@ -210,6 +202,9 @@ class mlmmj_plugin { @unlink("$controlDir/digestmaxmails"); } + if($rec['subject_prefix']) + file_put_contents("$controlDir/prefix", $rec['subject_prefix']); + $this->changeOwnership("$controlDir/*"); } } -- GitLab From d4381ff83c955787985d2369a7e511edb5620499 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 16:05:05 +0200 Subject: [PATCH 024/302] Setting ML prefix as the listname --- interface/web/mail/mail_mailinglist_edit.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/interface/web/mail/mail_mailinglist_edit.php b/interface/web/mail/mail_mailinglist_edit.php index 5515670734..96706b3271 100644 --- a/interface/web/mail/mail_mailinglist_edit.php +++ b/interface/web/mail/mail_mailinglist_edit.php @@ -194,6 +194,13 @@ class page_action extends tform_actions { function onAfterInsert() { global $app, $conf; + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; + if($mlManager == 'mlmmj') { + // The following update is usefull to set the prefix of the new mailinglist as the list name + $sql = 'UPDATE mail_mailinglist SET subject_prefix = ? WHERE mailinglist_id = ?'; + $app->db->query($sql, '['.$this->dataRecord['listname'].']', $this->id); + } + // make sure that the record belongs to the client group and not the admin group when a dmin inserts it // also make sure that the user can not delete domain created by a admin if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { -- GitLab From f2b16c8225edec2888d7cacbdb695b9677639a05 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 16:08:46 +0200 Subject: [PATCH 025/302] Fixed minor but blocking bug ...sorry... --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index a4802fba33..db0fbaf564 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -891,7 +891,7 @@ class installer_base { exec("nohup /usr/sbin/postmap $configDir/transport >/dev/null 2>&1"); //* Create/update cron entry - $cronEntry = 'find /var/'.$mlConfig['spool_dir'].'/ -mindepth 1 -maxdepth 1 -type d -exec /usr/bin/mlmmj-maintd -F -d {} \;' + $cronEntry = 'find /var/'.$mlConfig['spool_dir'].'/ -mindepth 1 -maxdepth 1 -type d -exec /usr/bin/mlmmj-maintd -F -d {} \;'; file_put_contents('/etc/cron.d/mlmmj', $cronEntry); } -- GitLab From e3c0e9c65624c672d3154a3450d20ce02fc8f2be Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 9 Sep 2016 16:58:35 +0200 Subject: [PATCH 026/302] Managed prefix and footer fields --- install/lib/installer_base.lib.php | 2 +- server/plugins-available/mlmmj_plugin.inc.php | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index db0fbaf564..f88cffe898 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -891,7 +891,7 @@ class installer_base { exec("nohup /usr/sbin/postmap $configDir/transport >/dev/null 2>&1"); //* Create/update cron entry - $cronEntry = 'find /var/'.$mlConfig['spool_dir'].'/ -mindepth 1 -maxdepth 1 -type d -exec /usr/bin/mlmmj-maintd -F -d {} \;'; + $cronEntry = '0 */2 * * * find /var'.$mlConfig['spool_dir'].'/ -mindepth 1 -maxdepth 1 -type d -exec /usr/bin/mlmmj-maintd -F -d {} \;'; file_put_contents('/etc/cron.d/mlmmj', $cronEntry); } diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php index 927d6e3875..9c074df846 100644 --- a/server/plugins-available/mlmmj_plugin.inc.php +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -111,7 +111,7 @@ class mlmmj_plugin { touch("$listDir/control/noarchive"); file_put_contents("$listDir/control/owner", $owner); file_put_contents("$listDir/control/listaddress", "$listName@$listDomain"); - file_put_contents("$listDir/control/prefix", $listName); + file_put_contents("$listDir/control/prefix", "[$listName]"); // Copying language translations if(!is_dir("/usr/share/mlmmj/text.skel/$lang")) $lang = 'en'; @@ -204,6 +204,16 @@ class mlmmj_plugin { if($rec['subject_prefix']) file_put_contents("$controlDir/prefix", $rec['subject_prefix']); + else @unlink("$controlDir/prefix"); + + if($rec['mail_footer']) + file_put_contents("$controlDir/footer", $rec['mail_footer']); + else @unlink("$controlDir/footer"); + + if($rec['archive'] == 'y') + @unlink("$controlDir/noarchive"); + else + touch("$controlDir/noarchive"); $this->changeOwnership("$controlDir/*"); } -- GitLab From bb17cd118ecdd37df2fe82e4b7a87b1fc17c0464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Sch=C3=BCtz?= Date: Sat, 10 Sep 2016 13:57:23 +0200 Subject: [PATCH 027/302] Remove stray closing parenthesis --- install/update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/update.php b/install/update.php index 7082148957..44d77f2a69 100644 --- a/install/update.php +++ b/install/update.php @@ -357,7 +357,7 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel } //* Configure mlmmj - if($conf['mlmmj']['installed'] == true && $inst->reconfigure_app('Mlmmj', $reconfigure_services_answer)) ) { + if($conf['mlmmj']['installed'] == true && $inst->reconfigure_app('Mlmmj', $reconfigure_services_answer)) { swriteln('Configuring Mlmmj'); $inst->configure_mlmmj(/*update*/); } -- GitLab From 58dcdbd0d3055cfae4e6d0b6bf4cc9dd34fa8c51 Mon Sep 17 00:00:00 2001 From: Frantisek Preissler Date: Mon, 12 Sep 2016 01:59:32 +0200 Subject: [PATCH 028/302] Add Markdown support for FAQ pages --- interface/lib/classes/parsedown/parsedown.php | 1538 +++++++++++++++++ .../lib/classes/parsedown/parsedown_extra.php | 526 ++++++ interface/web/help/faq_list.php | 20 +- 3 files changed, 2082 insertions(+), 2 deletions(-) create mode 100644 interface/lib/classes/parsedown/parsedown.php create mode 100644 interface/lib/classes/parsedown/parsedown_extra.php diff --git a/interface/lib/classes/parsedown/parsedown.php b/interface/lib/classes/parsedown/parsedown.php new file mode 100644 index 0000000000..5d96071ba4 --- /dev/null +++ b/interface/lib/classes/parsedown/parsedown.php @@ -0,0 +1,1538 @@ +DefinitionData = array(); + + # standardize line breaks + $text = str_replace(array("\r\n", "\r"), "\n", $text); + + # remove surrounding line breaks + $text = trim($text, "\n"); + + # split text into lines + $lines = explode("\n", $text); + + # iterate through lines to identify blocks + $markup = $this->lines($lines); + + # trim line breaks + $markup = trim($markup, "\n"); + + return $markup; + } + + # + # Setters + # + + function setBreaksEnabled($breaksEnabled) + { + $this->breaksEnabled = $breaksEnabled; + + return $this; + } + + protected $breaksEnabled; + + function setMarkupEscaped($markupEscaped) + { + $this->markupEscaped = $markupEscaped; + + return $this; + } + + protected $markupEscaped; + + function setUrlsLinked($urlsLinked) + { + $this->urlsLinked = $urlsLinked; + + return $this; + } + + protected $urlsLinked = true; + + # + # Lines + # + + protected $BlockTypes = array( + '#' => array('Header'), + '*' => array('Rule', 'List'), + '+' => array('List'), + '-' => array('SetextHeader', 'Table', 'Rule', 'List'), + '0' => array('List'), + '1' => array('List'), + '2' => array('List'), + '3' => array('List'), + '4' => array('List'), + '5' => array('List'), + '6' => array('List'), + '7' => array('List'), + '8' => array('List'), + '9' => array('List'), + ':' => array('Table'), + '<' => array('Comment', 'Markup'), + '=' => array('SetextHeader'), + '>' => array('Quote'), + '[' => array('Reference'), + '_' => array('Rule'), + '`' => array('FencedCode'), + '|' => array('Table'), + '~' => array('FencedCode'), + ); + + # ~ + + protected $unmarkedBlockTypes = array( + 'Code', + ); + + # + # Blocks + # + + protected function lines(array $lines) + { + $CurrentBlock = null; + + foreach ($lines as $line) + { + if (chop($line) === '') + { + if (isset($CurrentBlock)) + { + $CurrentBlock['interrupted'] = true; + } + + continue; + } + + if (strpos($line, "\t") !== false) + { + $parts = explode("\t", $line); + + $line = $parts[0]; + + unset($parts[0]); + + foreach ($parts as $part) + { + $shortage = 4 - mb_strlen($line, 'utf-8') % 4; + + $line .= str_repeat(' ', $shortage); + $line .= $part; + } + } + + $indent = 0; + + while (isset($line[$indent]) and $line[$indent] === ' ') + { + $indent ++; + } + + $text = $indent > 0 ? substr($line, $indent) : $line; + + # ~ + + $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); + + # ~ + + if (isset($CurrentBlock['continuable'])) + { + $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); + + if (isset($Block)) + { + $CurrentBlock = $Block; + + continue; + } + else + { + if ($this->isBlockCompletable($CurrentBlock['type'])) + { + $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); + } + } + } + + # ~ + + $marker = $text[0]; + + # ~ + + $blockTypes = $this->unmarkedBlockTypes; + + if (isset($this->BlockTypes[$marker])) + { + foreach ($this->BlockTypes[$marker] as $blockType) + { + $blockTypes []= $blockType; + } + } + + # + # ~ + + foreach ($blockTypes as $blockType) + { + $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); + + if (isset($Block)) + { + $Block['type'] = $blockType; + + if ( ! isset($Block['identified'])) + { + $Blocks []= $CurrentBlock; + + $Block['identified'] = true; + } + + if ($this->isBlockContinuable($blockType)) + { + $Block['continuable'] = true; + } + + $CurrentBlock = $Block; + + continue 2; + } + } + + # ~ + + if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) + { + $CurrentBlock['element']['text'] .= "\n".$text; + } + else + { + $Blocks []= $CurrentBlock; + + $CurrentBlock = $this->paragraph($Line); + + $CurrentBlock['identified'] = true; + } + } + + # ~ + + if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type'])) + { + $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); + } + + # ~ + + $Blocks []= $CurrentBlock; + + unset($Blocks[0]); + + # ~ + + $markup = ''; + + foreach ($Blocks as $Block) + { + if (isset($Block['hidden'])) + { + continue; + } + + $markup .= "\n"; + $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); + } + + $markup .= "\n"; + + # ~ + + return $markup; + } + + protected function isBlockContinuable($Type) + { + return method_exists($this, 'block'.$Type.'Continue'); + } + + protected function isBlockCompletable($Type) + { + return method_exists($this, 'block'.$Type.'Complete'); + } + + # + # Code + + protected function blockCode($Line, $Block = null) + { + if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) + { + return; + } + + if ($Line['indent'] >= 4) + { + $text = substr($Line['body'], 4); + + $Block = array( + 'element' => array( + 'name' => 'pre', + 'handler' => 'element', + 'text' => array( + 'name' => 'code', + 'text' => $text, + ), + ), + ); + + return $Block; + } + } + + protected function blockCodeContinue($Line, $Block) + { + if ($Line['indent'] >= 4) + { + if (isset($Block['interrupted'])) + { + $Block['element']['text']['text'] .= "\n"; + + unset($Block['interrupted']); + } + + $Block['element']['text']['text'] .= "\n"; + + $text = substr($Line['body'], 4); + + $Block['element']['text']['text'] .= $text; + + return $Block; + } + } + + protected function blockCodeComplete($Block) + { + $text = $Block['element']['text']['text']; + + $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); + + $Block['element']['text']['text'] = $text; + + return $Block; + } + + # + # Comment + + protected function blockComment($Line) + { + if ($this->markupEscaped) + { + return; + } + + if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') + { + $Block = array( + 'markup' => $Line['body'], + ); + + if (preg_match('/-->$/', $Line['text'])) + { + $Block['closed'] = true; + } + + return $Block; + } + } + + protected function blockCommentContinue($Line, array $Block) + { + if (isset($Block['closed'])) + { + return; + } + + $Block['markup'] .= "\n" . $Line['body']; + + if (preg_match('/-->$/', $Line['text'])) + { + $Block['closed'] = true; + } + + return $Block; + } + + # + # Fenced Code + + protected function blockFencedCode($Line) + { + if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) + { + $Element = array( + 'name' => 'code', + 'text' => '', + ); + + if (isset($matches[1])) + { + $class = 'language-'.$matches[1]; + + $Element['attributes'] = array( + 'class' => $class, + ); + } + + $Block = array( + 'char' => $Line['text'][0], + 'element' => array( + 'name' => 'pre', + 'handler' => 'element', + 'text' => $Element, + ), + ); + + return $Block; + } + } + + protected function blockFencedCodeContinue($Line, $Block) + { + if (isset($Block['complete'])) + { + return; + } + + if (isset($Block['interrupted'])) + { + $Block['element']['text']['text'] .= "\n"; + + unset($Block['interrupted']); + } + + if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) + { + $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); + + $Block['complete'] = true; + + return $Block; + } + + $Block['element']['text']['text'] .= "\n".$Line['body'];; + + return $Block; + } + + protected function blockFencedCodeComplete($Block) + { + $text = $Block['element']['text']['text']; + + $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); + + $Block['element']['text']['text'] = $text; + + return $Block; + } + + # + # Header + + protected function blockHeader($Line) + { + if (isset($Line['text'][1])) + { + $level = 1; + + while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') + { + $level ++; + } + + if ($level > 6) + { + return; + } + + $text = trim($Line['text'], '# '); + + $Block = array( + 'element' => array( + 'name' => 'h' . min(6, $level), + 'text' => $text, + 'handler' => 'line', + ), + ); + + return $Block; + } + } + + # + # List + + protected function blockList($Line) + { + list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); + + if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) + { + $Block = array( + 'indent' => $Line['indent'], + 'pattern' => $pattern, + 'element' => array( + 'name' => $name, + 'handler' => 'elements', + ), + ); + + $Block['li'] = array( + 'name' => 'li', + 'handler' => 'li', + 'text' => array( + $matches[2], + ), + ); + + $Block['element']['text'] []= & $Block['li']; + + return $Block; + } + } + + protected function blockListContinue($Line, array $Block) + { + if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) + { + if (isset($Block['interrupted'])) + { + $Block['li']['text'] []= ''; + + unset($Block['interrupted']); + } + + unset($Block['li']); + + $text = isset($matches[1]) ? $matches[1] : ''; + + $Block['li'] = array( + 'name' => 'li', + 'handler' => 'li', + 'text' => array( + $text, + ), + ); + + $Block['element']['text'] []= & $Block['li']; + + return $Block; + } + + if ($Line['text'][0] === '[' and $this->blockReference($Line)) + { + return $Block; + } + + if ( ! isset($Block['interrupted'])) + { + $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); + + $Block['li']['text'] []= $text; + + return $Block; + } + + if ($Line['indent'] > 0) + { + $Block['li']['text'] []= ''; + + $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); + + $Block['li']['text'] []= $text; + + unset($Block['interrupted']); + + return $Block; + } + } + + # + # Quote + + protected function blockQuote($Line) + { + if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) + { + $Block = array( + 'element' => array( + 'name' => 'blockquote', + 'handler' => 'lines', + 'text' => (array) $matches[1], + ), + ); + + return $Block; + } + } + + protected function blockQuoteContinue($Line, array $Block) + { + if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) + { + if (isset($Block['interrupted'])) + { + $Block['element']['text'] []= ''; + + unset($Block['interrupted']); + } + + $Block['element']['text'] []= $matches[1]; + + return $Block; + } + + if ( ! isset($Block['interrupted'])) + { + $Block['element']['text'] []= $Line['text']; + + return $Block; + } + } + + # + # Rule + + protected function blockRule($Line) + { + if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) + { + $Block = array( + 'element' => array( + 'name' => 'hr' + ), + ); + + return $Block; + } + } + + # + # Setext + + protected function blockSetextHeader($Line, array $Block = null) + { + if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) + { + return; + } + + if (chop($Line['text'], $Line['text'][0]) === '') + { + $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; + + return $Block; + } + } + + # + # Markup + + protected function blockMarkup($Line) + { + if ($this->markupEscaped) + { + return; + } + + if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) + { + $element = strtolower($matches[1]); + + if (in_array($element, $this->textLevelElements)) + { + return; + } + + $Block = array( + 'name' => $matches[1], + 'depth' => 0, + 'markup' => $Line['text'], + ); + + $length = strlen($matches[0]); + + $remainder = substr($Line['text'], $length); + + if (trim($remainder) === '') + { + if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) + { + $Block['closed'] = true; + + $Block['void'] = true; + } + } + else + { + if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) + { + return; + } + + if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) + { + $Block['closed'] = true; + } + } + + return $Block; + } + } + + protected function blockMarkupContinue($Line, array $Block) + { + if (isset($Block['closed'])) + { + return; + } + + if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open + { + $Block['depth'] ++; + } + + if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close + { + if ($Block['depth'] > 0) + { + $Block['depth'] --; + } + else + { + $Block['closed'] = true; + } + } + + if (isset($Block['interrupted'])) + { + $Block['markup'] .= "\n"; + + unset($Block['interrupted']); + } + + $Block['markup'] .= "\n".$Line['body']; + + return $Block; + } + + # + # Reference + + protected function blockReference($Line) + { + if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) + { + $id = strtolower($matches[1]); + + $Data = array( + 'url' => $matches[2], + 'title' => null, + ); + + if (isset($matches[3])) + { + $Data['title'] = $matches[3]; + } + + $this->DefinitionData['Reference'][$id] = $Data; + + $Block = array( + 'hidden' => true, + ); + + return $Block; + } + } + + # + # Table + + protected function blockTable($Line, array $Block = null) + { + if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) + { + return; + } + + if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') + { + $alignments = array(); + + $divider = $Line['text']; + + $divider = trim($divider); + $divider = trim($divider, '|'); + + $dividerCells = explode('|', $divider); + + foreach ($dividerCells as $dividerCell) + { + $dividerCell = trim($dividerCell); + + if ($dividerCell === '') + { + continue; + } + + $alignment = null; + + if ($dividerCell[0] === ':') + { + $alignment = 'left'; + } + + if (substr($dividerCell, - 1) === ':') + { + $alignment = $alignment === 'left' ? 'center' : 'right'; + } + + $alignments []= $alignment; + } + + # ~ + + $HeaderElements = array(); + + $header = $Block['element']['text']; + + $header = trim($header); + $header = trim($header, '|'); + + $headerCells = explode('|', $header); + + foreach ($headerCells as $index => $headerCell) + { + $headerCell = trim($headerCell); + + $HeaderElement = array( + 'name' => 'th', + 'text' => $headerCell, + 'handler' => 'line', + ); + + if (isset($alignments[$index])) + { + $alignment = $alignments[$index]; + + $HeaderElement['attributes'] = array( + 'style' => 'text-align: '.$alignment.';', + ); + } + + $HeaderElements []= $HeaderElement; + } + + # ~ + + $Block = array( + 'alignments' => $alignments, + 'identified' => true, + 'element' => array( + 'name' => 'table', + 'handler' => 'elements', + ), + ); + + $Block['element']['text'] []= array( + 'name' => 'thead', + 'handler' => 'elements', + ); + + $Block['element']['text'] []= array( + 'name' => 'tbody', + 'handler' => 'elements', + 'text' => array(), + ); + + $Block['element']['text'][0]['text'] []= array( + 'name' => 'tr', + 'handler' => 'elements', + 'text' => $HeaderElements, + ); + + return $Block; + } + } + + protected function blockTableContinue($Line, array $Block) + { + if (isset($Block['interrupted'])) + { + return; + } + + if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) + { + $Elements = array(); + + $row = $Line['text']; + + $row = trim($row); + $row = trim($row, '|'); + + preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); + + foreach ($matches[0] as $index => $cell) + { + $cell = trim($cell); + + $Element = array( + 'name' => 'td', + 'handler' => 'line', + 'text' => $cell, + ); + + if (isset($Block['alignments'][$index])) + { + $Element['attributes'] = array( + 'style' => 'text-align: '.$Block['alignments'][$index].';', + ); + } + + $Elements []= $Element; + } + + $Element = array( + 'name' => 'tr', + 'handler' => 'elements', + 'text' => $Elements, + ); + + $Block['element']['text'][1]['text'] []= $Element; + + return $Block; + } + } + + # + # ~ + # + + protected function paragraph($Line) + { + $Block = array( + 'element' => array( + 'name' => 'p', + 'text' => $Line['text'], + 'handler' => 'line', + ), + ); + + return $Block; + } + + # + # Inline Elements + # + + protected $InlineTypes = array( + '"' => array('SpecialCharacter'), + '!' => array('Image'), + '&' => array('SpecialCharacter'), + '*' => array('Emphasis'), + ':' => array('Url'), + '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), + '>' => array('SpecialCharacter'), + '[' => array('Link'), + '_' => array('Emphasis'), + '`' => array('Code'), + '~' => array('Strikethrough'), + '\\' => array('EscapeSequence'), + ); + + # ~ + + protected $inlineMarkerList = '!"*_&[:<>`~\\'; + + # + # ~ + # + + public function line($text) + { + $markup = ''; + + # $excerpt is based on the first occurrence of a marker + + while ($excerpt = strpbrk($text, $this->inlineMarkerList)) + { + $marker = $excerpt[0]; + + $markerPosition = strpos($text, $marker); + + $Excerpt = array('text' => $excerpt, 'context' => $text); + + foreach ($this->InlineTypes[$marker] as $inlineType) + { + $Inline = $this->{'inline'.$inlineType}($Excerpt); + + if ( ! isset($Inline)) + { + continue; + } + + # makes sure that the inline belongs to "our" marker + + if (isset($Inline['position']) and $Inline['position'] > $markerPosition) + { + continue; + } + + # sets a default inline position + + if ( ! isset($Inline['position'])) + { + $Inline['position'] = $markerPosition; + } + + # the text that comes before the inline + $unmarkedText = substr($text, 0, $Inline['position']); + + # compile the unmarked text + $markup .= $this->unmarkedText($unmarkedText); + + # compile the inline + $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); + + # remove the examined text + $text = substr($text, $Inline['position'] + $Inline['extent']); + + continue 2; + } + + # the marker does not belong to an inline + + $unmarkedText = substr($text, 0, $markerPosition + 1); + + $markup .= $this->unmarkedText($unmarkedText); + + $text = substr($text, $markerPosition + 1); + } + + $markup .= $this->unmarkedText($text); + + return $markup; + } + + # + # ~ + # + + protected function inlineCode($Excerpt) + { + $marker = $Excerpt['text'][0]; + + if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), + 'element' => array( + 'name' => 'code', + 'text' => $text, + ), + ); + } + } + + protected function inlineEmailTag($Excerpt) + { + if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) + { + $url = $matches[1]; + + if ( ! isset($matches[2])) + { + $url = 'mailto:' . $url; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $matches[1], + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + protected function inlineEmphasis($Excerpt) + { + if ( ! isset($Excerpt['text'][1])) + { + return; + } + + $marker = $Excerpt['text'][0]; + + if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) + { + $emphasis = 'strong'; + } + elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) + { + $emphasis = 'em'; + } + else + { + return; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => $emphasis, + 'handler' => 'line', + 'text' => $matches[1], + ), + ); + } + + protected function inlineEscapeSequence($Excerpt) + { + if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) + { + return array( + 'markup' => $Excerpt['text'][1], + 'extent' => 2, + ); + } + } + + protected function inlineImage($Excerpt) + { + if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') + { + return; + } + + $Excerpt['text']= substr($Excerpt['text'], 1); + + $Link = $this->inlineLink($Excerpt); + + if ($Link === null) + { + return; + } + + $Inline = array( + 'extent' => $Link['extent'] + 1, + 'element' => array( + 'name' => 'img', + 'attributes' => array( + 'src' => $Link['element']['attributes']['href'], + 'alt' => $Link['element']['text'], + ), + ), + ); + + $Inline['element']['attributes'] += $Link['element']['attributes']; + + unset($Inline['element']['attributes']['href']); + + return $Inline; + } + + protected function inlineLink($Excerpt) + { + $Element = array( + 'name' => 'a', + 'handler' => 'line', + 'text' => null, + 'attributes' => array( + 'href' => null, + 'title' => null, + ), + ); + + $extent = 0; + + $remainder = $Excerpt['text']; + + if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches)) + { + $Element['text'] = $matches[1]; + + $extent += strlen($matches[0]); + + $remainder = substr($remainder, $extent); + } + else + { + return; + } + + if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches)) + { + $Element['attributes']['href'] = $matches[1]; + + if (isset($matches[2])) + { + $Element['attributes']['title'] = substr($matches[2], 1, - 1); + } + + $extent += strlen($matches[0]); + } + else + { + if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) + { + $definition = strlen($matches[1]) ? $matches[1] : $Element['text']; + $definition = strtolower($definition); + + $extent += strlen($matches[0]); + } + else + { + $definition = strtolower($Element['text']); + } + + if ( ! isset($this->DefinitionData['Reference'][$definition])) + { + return; + } + + $Definition = $this->DefinitionData['Reference'][$definition]; + + $Element['attributes']['href'] = $Definition['url']; + $Element['attributes']['title'] = $Definition['title']; + } + + $Element['attributes']['href'] = str_replace(array('&', '<'), array('&', '<'), $Element['attributes']['href']); + + return array( + 'extent' => $extent, + 'element' => $Element, + ); + } + + protected function inlineMarkup($Excerpt) + { + if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false) + { + return; + } + + if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + + if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + + if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + } + + protected function inlineSpecialCharacter($Excerpt) + { + if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) + { + return array( + 'markup' => '&', + 'extent' => 1, + ); + } + + $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); + + if (isset($SpecialCharacter[$Excerpt['text'][0]])) + { + return array( + 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', + 'extent' => 1, + ); + } + } + + protected function inlineStrikethrough($Excerpt) + { + if ( ! isset($Excerpt['text'][1])) + { + return; + } + + if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) + { + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'del', + 'text' => $matches[1], + 'handler' => 'line', + ), + ); + } + } + + protected function inlineUrl($Excerpt) + { + if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') + { + return; + } + + if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) + { + $Inline = array( + 'extent' => strlen($matches[0][0]), + 'position' => $matches[0][1], + 'element' => array( + 'name' => 'a', + 'text' => $matches[0][0], + 'attributes' => array( + 'href' => $matches[0][0], + ), + ), + ); + + return $Inline; + } + } + + protected function inlineUrlTag($Excerpt) + { + if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) + { + $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $url, + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + # ~ + + protected function unmarkedText($text) + { + if ($this->breaksEnabled) + { + $text = preg_replace('/[ ]*\n/', "
\n", $text); + } + else + { + $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); + $text = str_replace(" \n", "\n", $text); + } + + return $text; + } + + # + # Handlers + # + + protected function element(array $Element) + { + $markup = '<'.$Element['name']; + + if (isset($Element['attributes'])) + { + foreach ($Element['attributes'] as $name => $value) + { + if ($value === null) + { + continue; + } + + $markup .= ' '.$name.'="'.$value.'"'; + } + } + + if (isset($Element['text'])) + { + $markup .= '>'; + + if (isset($Element['handler'])) + { + $markup .= $this->{$Element['handler']}($Element['text']); + } + else + { + $markup .= $Element['text']; + } + + $markup .= ''; + } + else + { + $markup .= ' />'; + } + + return $markup; + } + + protected function elements(array $Elements) + { + $markup = ''; + + foreach ($Elements as $Element) + { + $markup .= "\n" . $this->element($Element); + } + + $markup .= "\n"; + + return $markup; + } + + # ~ + + protected function li($lines) + { + $markup = $this->lines($lines); + + $trimmedMarkup = trim($markup); + + if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') + { + $markup = $trimmedMarkup; + $markup = substr($markup, 3); + + $position = strpos($markup, "

"); + + $markup = substr_replace($markup, '', $position, 4); + } + + return $markup; + } + + # + # Deprecated Methods + # + + function parse($text) + { + $markup = $this->text($text); + + return $markup; + } + + # + # Static Methods + # + + static function instance($name = 'default') + { + if (isset(self::$instances[$name])) + { + return self::$instances[$name]; + } + + $instance = new static(); + + self::$instances[$name] = $instance; + + return $instance; + } + + private static $instances = array(); + + # + # Fields + # + + protected $DefinitionData; + + # + # Read-Only + + protected $specialCharacters = array( + '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', + ); + + protected $StrongRegex = array( + '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', + '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', + ); + + protected $EmRegex = array( + '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', + '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', + ); + + protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; + + protected $voidElements = array( + 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', + ); + + protected $textLevelElements = array( + 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', + 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', + 'i', 'rp', 'del', 'code', 'strike', 'marquee', + 'q', 'rt', 'ins', 'font', 'strong', + 's', 'tt', 'sub', 'mark', + 'u', 'xm', 'sup', 'nobr', + 'var', 'ruby', + 'wbr', 'span', + 'time', + ); +} \ No newline at end of file diff --git a/interface/lib/classes/parsedown/parsedown_extra.php b/interface/lib/classes/parsedown/parsedown_extra.php new file mode 100644 index 0000000000..7061893bd8 --- /dev/null +++ b/interface/lib/classes/parsedown/parsedown_extra.php @@ -0,0 +1,526 @@ +BlockTypes[':'] []= 'DefinitionList'; + $this->BlockTypes['*'] []= 'Abbreviation'; + + # identify footnote definitions before reference definitions + array_unshift($this->BlockTypes['['], 'Footnote'); + + # identify footnote markers before before links + array_unshift($this->InlineTypes['['], 'FootnoteMarker'); + } + + # + # ~ + + function text($text) + { + $markup = parent::text($text); + + # merge consecutive dl elements + + $markup = preg_replace('/<\/dl>\s+
\s+/', '', $markup); + + # add footnotes + + if (isset($this->DefinitionData['Footnote'])) + { + $Element = $this->buildFootnoteElement(); + + $markup .= "\n" . $this->element($Element); + } + + return $markup; + } + + # + # Blocks + # + + # + # Abbreviation + + protected function blockAbbreviation($Line) + { + if (preg_match('/^\*\[(.+?)\]:[ ]*(.+?)[ ]*$/', $Line['text'], $matches)) + { + $this->DefinitionData['Abbreviation'][$matches[1]] = $matches[2]; + + $Block = array( + 'hidden' => true, + ); + + return $Block; + } + } + + # + # Footnote + + protected function blockFootnote($Line) + { + if (preg_match('/^\[\^(.+?)\]:[ ]?(.*)$/', $Line['text'], $matches)) + { + $Block = array( + 'label' => $matches[1], + 'text' => $matches[2], + 'hidden' => true, + ); + + return $Block; + } + } + + protected function blockFootnoteContinue($Line, $Block) + { + if ($Line['text'][0] === '[' and preg_match('/^\[\^(.+?)\]:/', $Line['text'])) + { + return; + } + + if (isset($Block['interrupted'])) + { + if ($Line['indent'] >= 4) + { + $Block['text'] .= "\n\n" . $Line['text']; + + return $Block; + } + } + else + { + $Block['text'] .= "\n" . $Line['text']; + + return $Block; + } + } + + protected function blockFootnoteComplete($Block) + { + $this->DefinitionData['Footnote'][$Block['label']] = array( + 'text' => $Block['text'], + 'count' => null, + 'number' => null, + ); + + return $Block; + } + + # + # Definition List + + protected function blockDefinitionList($Line, $Block) + { + if ( ! isset($Block) or isset($Block['type'])) + { + return; + } + + $Element = array( + 'name' => 'dl', + 'handler' => 'elements', + 'text' => array(), + ); + + $terms = explode("\n", $Block['element']['text']); + + foreach ($terms as $term) + { + $Element['text'] []= array( + 'name' => 'dt', + 'handler' => 'line', + 'text' => $term, + ); + } + + $Block['element'] = $Element; + + $Block = $this->addDdElement($Line, $Block); + + return $Block; + } + + protected function blockDefinitionListContinue($Line, array $Block) + { + if ($Line['text'][0] === ':') + { + $Block = $this->addDdElement($Line, $Block); + + return $Block; + } + else + { + if (isset($Block['interrupted']) and $Line['indent'] === 0) + { + return; + } + + if (isset($Block['interrupted'])) + { + $Block['dd']['handler'] = 'text'; + $Block['dd']['text'] .= "\n\n"; + + unset($Block['interrupted']); + } + + $text = substr($Line['body'], min($Line['indent'], 4)); + + $Block['dd']['text'] .= "\n" . $text; + + return $Block; + } + } + + # + # Header + + protected function blockHeader($Line) + { + $Block = parent::blockHeader($Line); + + if (preg_match('/[ #]*{('.$this->regexAttribute.'+)}[ ]*$/', $Block['element']['text'], $matches, PREG_OFFSET_CAPTURE)) + { + $attributeString = $matches[1][0]; + + $Block['element']['attributes'] = $this->parseAttributeData($attributeString); + + $Block['element']['text'] = substr($Block['element']['text'], 0, $matches[0][1]); + } + + return $Block; + } + + # + # Markup + + protected function blockMarkupComplete($Block) + { + if ( ! isset($Block['void'])) + { + $Block['markup'] = $this->processTag($Block['markup']); + } + + return $Block; + } + + # + # Setext + + protected function blockSetextHeader($Line, array $Block = null) + { + $Block = parent::blockSetextHeader($Line, $Block); + + if (preg_match('/[ ]*{('.$this->regexAttribute.'+)}[ ]*$/', $Block['element']['text'], $matches, PREG_OFFSET_CAPTURE)) + { + $attributeString = $matches[1][0]; + + $Block['element']['attributes'] = $this->parseAttributeData($attributeString); + + $Block['element']['text'] = substr($Block['element']['text'], 0, $matches[0][1]); + } + + return $Block; + } + + # + # Inline Elements + # + + # + # Footnote Marker + + protected function inlineFootnoteMarker($Excerpt) + { + if (preg_match('/^\[\^(.+?)\]/', $Excerpt['text'], $matches)) + { + $name = $matches[1]; + + if ( ! isset($this->DefinitionData['Footnote'][$name])) + { + return; + } + + $this->DefinitionData['Footnote'][$name]['count'] ++; + + if ( ! isset($this->DefinitionData['Footnote'][$name]['number'])) + { + $this->DefinitionData['Footnote'][$name]['number'] = ++ $this->footnoteCount; # » & + } + + $Element = array( + 'name' => 'sup', + 'attributes' => array('id' => 'fnref'.$this->DefinitionData['Footnote'][$name]['count'].':'.$name), + 'handler' => 'element', + 'text' => array( + 'name' => 'a', + 'attributes' => array('href' => '#fn:'.$name, 'class' => 'footnote-ref'), + 'text' => $this->DefinitionData['Footnote'][$name]['number'], + ), + ); + + return array( + 'extent' => strlen($matches[0]), + 'element' => $Element, + ); + } + } + + private $footnoteCount = 0; + + # + # Link + + protected function inlineLink($Excerpt) + { + $Link = parent::inlineLink($Excerpt); + + $remainder = substr($Excerpt['text'], $Link['extent']); + + if (preg_match('/^[ ]*{('.$this->regexAttribute.'+)}/', $remainder, $matches)) + { + $Link['element']['attributes'] += $this->parseAttributeData($matches[1]); + + $Link['extent'] += strlen($matches[0]); + } + + return $Link; + } + + # + # ~ + # + + protected function unmarkedText($text) + { + $text = parent::unmarkedText($text); + + if (isset($this->DefinitionData['Abbreviation'])) + { + foreach ($this->DefinitionData['Abbreviation'] as $abbreviation => $meaning) + { + $pattern = '/\b'.preg_quote($abbreviation, '/').'\b/'; + + $text = preg_replace($pattern, ''.$abbreviation.'', $text); + } + } + + return $text; + } + + # + # Util Methods + # + + protected function addDdElement(array $Line, array $Block) + { + $text = substr($Line['text'], 1); + $text = trim($text); + + unset($Block['dd']); + + $Block['dd'] = array( + 'name' => 'dd', + 'handler' => 'line', + 'text' => $text, + ); + + if (isset($Block['interrupted'])) + { + $Block['dd']['handler'] = 'text'; + + unset($Block['interrupted']); + } + + $Block['element']['text'] []= & $Block['dd']; + + return $Block; + } + + protected function buildFootnoteElement() + { + $Element = array( + 'name' => 'div', + 'attributes' => array('class' => 'footnotes'), + 'handler' => 'elements', + 'text' => array( + array( + 'name' => 'hr', + ), + array( + 'name' => 'ol', + 'handler' => 'elements', + 'text' => array(), + ), + ), + ); + + uasort($this->DefinitionData['Footnote'], 'self::sortFootnotes'); + + foreach ($this->DefinitionData['Footnote'] as $definitionId => $DefinitionData) + { + if ( ! isset($DefinitionData['number'])) + { + continue; + } + + $text = $DefinitionData['text']; + + $text = parent::text($text); + + $numbers = range(1, $DefinitionData['count']); + + $backLinksMarkup = ''; + + foreach ($numbers as $number) + { + $backLinksMarkup .= ' '; + } + + $backLinksMarkup = substr($backLinksMarkup, 1); + + if (substr($text, - 4) === '

') + { + $backLinksMarkup = ' '.$backLinksMarkup; + + $text = substr_replace($text, $backLinksMarkup.'

', - 4); + } + else + { + $text .= "\n".'

'.$backLinksMarkup.'

'; + } + + $Element['text'][1]['text'] []= array( + 'name' => 'li', + 'attributes' => array('id' => 'fn:'.$definitionId), + 'text' => "\n".$text."\n", + ); + } + + return $Element; + } + + # ~ + + protected function parseAttributeData($attributeString) + { + $Data = array(); + + $attributes = preg_split('/[ ]+/', $attributeString, - 1, PREG_SPLIT_NO_EMPTY); + + foreach ($attributes as $attribute) + { + if ($attribute[0] === '#') + { + $Data['id'] = substr($attribute, 1); + } + else # "." + { + $classes []= substr($attribute, 1); + } + } + + if (isset($classes)) + { + $Data['class'] = implode(' ', $classes); + } + + return $Data; + } + + # ~ + + protected function processTag($elementMarkup) # recursive + { + # http://stackoverflow.com/q/1148928/200145 + libxml_use_internal_errors(true); + + $DOMDocument = new DOMDocument; + + # http://stackoverflow.com/q/11309194/200145 + $elementMarkup = mb_convert_encoding($elementMarkup, 'HTML-ENTITIES', 'UTF-8'); + + # http://stackoverflow.com/q/4879946/200145 + $DOMDocument->loadHTML($elementMarkup); + $DOMDocument->removeChild($DOMDocument->doctype); + $DOMDocument->replaceChild($DOMDocument->firstChild->firstChild->firstChild, $DOMDocument->firstChild); + + $elementText = ''; + + if ($DOMDocument->documentElement->getAttribute('markdown') === '1') + { + foreach ($DOMDocument->documentElement->childNodes as $Node) + { + $elementText .= $DOMDocument->saveHTML($Node); + } + + $DOMDocument->documentElement->removeAttribute('markdown'); + + $elementText = "\n".$this->text($elementText)."\n"; + } + else + { + foreach ($DOMDocument->documentElement->childNodes as $Node) + { + $nodeMarkup = $DOMDocument->saveHTML($Node); + + if ($Node instanceof DOMElement and ! in_array($Node->nodeName, $this->textLevelElements)) + { + $elementText .= $this->processTag($nodeMarkup); + } + else + { + $elementText .= $nodeMarkup; + } + } + } + + # because we don't want for markup to get encoded + $DOMDocument->documentElement->nodeValue = 'placeholder\x1A'; + + $markup = $DOMDocument->saveHTML($DOMDocument->documentElement); + $markup = str_replace('placeholder\x1A', $elementText, $markup); + + return $markup; + } + + # ~ + + protected function sortFootnotes($A, $B) # callback + { + return $A['number'] - $B['number']; + } + + # + # Fields + # + + protected $regexAttribute = '(?:[#.][-\w]+[ ]*)'; +} \ No newline at end of file diff --git a/interface/web/help/faq_list.php b/interface/web/help/faq_list.php index 128480dca2..4ea86722cf 100644 --- a/interface/web/help/faq_list.php +++ b/interface/web/help/faq_list.php @@ -3,6 +3,10 @@ require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; +// Markdown support +require_once '../../lib/classes/parsedown/parsedown.php'; +require_once '../../lib/classes/parsedown/parsedown_extra.php'; + // Path to the list definition file $list_def_file = 'list/faq_list.php'; @@ -15,6 +19,18 @@ if(!stristr($_SESSION['s']['user']['modules'], 'help')) { // Loading the class $app->uses('listform_actions'); +class list_actions extends listform_actions { + /** + * @author Frantisek Preissler + */ + function prepareDataRow($rec) { + $rec['hf_answer'] = ParsedownExtra::instance()->parse($rec['hf_answer']); + return parent::prepareDataRow($rec); + } +} + +$override = new list_actions; + // Optional limit $hf_section = 0; if(isset($_GET['hfs_id'])) @@ -26,12 +42,12 @@ if(!$hf_section) $res = $app->db->queryOneRecord("SELECT MIN(hfs_id) AS min_id FROM help_faq_sections"); $hf_section = $res['min_id']; } -$app->listform_actions->SQLExtWhere = "help_faq.hf_section = $hf_section"; +$override->SQLExtWhere = "help_faq.hf_section = $hf_section"; if($hf_section) $res = $app->db->queryOneRecord("SELECT hfs_name FROM help_faq_sections WHERE hfs_id=?", $hf_section); // Start the form rendering and action ahndling echo "

FAQ: ".$res['hfs_name']."

"; -if($hf_section) $app->listform_actions->onLoad(); +if($hf_section) $override->onLoad(); ?> -- GitLab From 6054635983540d5d3a328bf139af2cd93f84c889 Mon Sep 17 00:00:00 2001 From: Michele Date: Mon, 12 Sep 2016 22:15:21 +0200 Subject: [PATCH 029/302] Moved incremental sql update to the right location --- install/sql/incremental/upd_0084.sql | 11 ----------- install/sql/incremental/upd_dev_collection.sql | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 install/sql/incremental/upd_0084.sql diff --git a/install/sql/incremental/upd_0084.sql b/install/sql/incremental/upd_0084.sql deleted file mode 100644 index ca8ffd09a3..0000000000 --- a/install/sql/incremental/upd_0084.sql +++ /dev/null @@ -1,11 +0,0 @@ -ALTER TABLE `mail_mailinglist` ADD `list_type` enum('open','closed') NOT NULL DEFAULT 'open'; -ALTER TABLE `mail_mailinglist` ADD `subject_prefix` varchar(50) NOT NULL DEFAULT ''; -ALTER TABLE `mail_mailinglist` ADD `admins` mediumtext; -ALTER TABLE `mail_mailinglist` ADD `digestinterval` int(11) NOT NULL DEFAULT '7'; -ALTER TABLE `mail_mailinglist` ADD `digestmaxmails` int(11) NOT NULL DEFAULT '50'; -ALTER TABLE `mail_mailinglist` ADD `archive` enum('n','y') NOT NULL DEFAULT 'n'; -ALTER TABLE `mail_mailinglist` ADD `digesttext` ENUM('n','y') NOT NULL DEFAULT 'n'; -ALTER TABLE `mail_mailinglist` ADD `digestsub` ENUM('n','y') NOT NULL DEFAULT 'n'; -ALTER TABLE `mail_mailinglist` ADD `mail_footer` mediumtext; -ALTER TABLE `mail_mailinglist` ADD `subscribe_policy` enum('disabled','confirm','approval','both','none') NOT NULL DEFAULT 'confirm'; -ALTER TABLE `mail_mailinglist` ADD `posting_policy` enum('closed','moderated','free') NOT NULL DEFAULT 'free'; \ No newline at end of file diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index e69de29bb2..ca8ffd09a3 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -0,0 +1,11 @@ +ALTER TABLE `mail_mailinglist` ADD `list_type` enum('open','closed') NOT NULL DEFAULT 'open'; +ALTER TABLE `mail_mailinglist` ADD `subject_prefix` varchar(50) NOT NULL DEFAULT ''; +ALTER TABLE `mail_mailinglist` ADD `admins` mediumtext; +ALTER TABLE `mail_mailinglist` ADD `digestinterval` int(11) NOT NULL DEFAULT '7'; +ALTER TABLE `mail_mailinglist` ADD `digestmaxmails` int(11) NOT NULL DEFAULT '50'; +ALTER TABLE `mail_mailinglist` ADD `archive` enum('n','y') NOT NULL DEFAULT 'n'; +ALTER TABLE `mail_mailinglist` ADD `digesttext` ENUM('n','y') NOT NULL DEFAULT 'n'; +ALTER TABLE `mail_mailinglist` ADD `digestsub` ENUM('n','y') NOT NULL DEFAULT 'n'; +ALTER TABLE `mail_mailinglist` ADD `mail_footer` mediumtext; +ALTER TABLE `mail_mailinglist` ADD `subscribe_policy` enum('disabled','confirm','approval','both','none') NOT NULL DEFAULT 'confirm'; +ALTER TABLE `mail_mailinglist` ADD `posting_policy` enum('closed','moderated','free') NOT NULL DEFAULT 'free'; \ No newline at end of file -- GitLab From e84d5f90b1f7cbffc4dfca873a7644f3172cf068 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 16 Sep 2016 10:03:56 +0200 Subject: [PATCH 030/302] Update mail_user.tform.php --- interface/web/mail/form/mail_user.tform.php | 68 +++++++++++---------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php index 8a19e66750..115d44deea 100644 --- a/interface/web/mail/form/mail_user.tform.php +++ b/interface/web/mail/form/mail_user.tform.php @@ -408,38 +408,40 @@ if ($_SESSION["s"]["user"]["typ"] == 'admin' && $global_config['mail']['mailbox_ } //* Backup -$form["tabs"]['backup'] = array ( - 'title' => "Backup", - 'width' => 100, - 'template' => "templates/mail_user_backup.htm", - 'readonly' => false, - 'fields' => array ( - ################################## - # Begin Datatable fields - ################################## - 'backup_interval' => array ( - 'datatype' => 'VARCHAR', - 'formtype' => 'SELECT', - 'default' => '', - 'value' => array('none' => 'no_backup_txt', 'daily' => 'daily_backup_txt', 'weekly' => 'weekly_backup_txt', 'monthly' => 'monthly_backup_txt') - ), - 'backup_copies' => array ( - 'datatype' => 'INTEGER', - 'formtype' => 'SELECT', - 'default' => '', - 'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10') - ), - ################################## - # ENDE Datatable fields - ################################## - ), - 'plugins' => array ( - 'backup_records' => array ( - 'class' => 'plugin_backuplist_mail', - 'options' => array( - ) - ) - ) -); +if ($global_config['mail']['mailbox_show_backup_tab'] === 'y') { + $form["tabs"]['backup'] = array ( + 'title' => "Backup", + 'width' => 100, + 'template' => "templates/mail_user_backup.htm", + 'readonly' => false, + 'fields' => array ( + ################################## + # Begin Datatable fields + ################################## + 'backup_interval' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'default' => '', + 'value' => array('none' => 'no_backup_txt', 'daily' => 'daily_backup_txt', 'weekly' => 'weekly_backup_txt', 'monthly' => 'monthly_backup_txt') + ), + 'backup_copies' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10') + ), + ################################## + # ENDE Datatable fields + ################################## + ), + 'plugins' => array ( + 'backup_records' => array ( + 'class' => 'plugin_backuplist_mail', + 'options' => array( + ) + ) + ) + ); +} ?> -- GitLab From 6ca75a64626d78b3a3d9c7a8c95ce6a3b03eb8d7 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 16 Sep 2016 10:05:42 +0200 Subject: [PATCH 031/302] Update system_config.tform.php --- interface/web/admin/form/system_config.tform.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php index 7261865796..658596e7aa 100644 --- a/interface/web/admin/form/system_config.tform.php +++ b/interface/web/admin/form/system_config.tform.php @@ -238,6 +238,12 @@ $form["tabs"]['mail'] = array ( 'default' => 'y', 'value' => array(0 => 'n', 1 => 'y') ), + 'mailbox_show_backup_tab' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'y', + 'value' => array(0 => 'n', 1 => 'y') + ), 'mailboxlist_webmail_link' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', -- GitLab From 3ff62c057f193f7fac0c16038c2206ea78abeb18 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 16 Sep 2016 10:06:48 +0200 Subject: [PATCH 032/302] Update system_config_mail_edit.htm --- interface/web/admin/templates/system_config_mail_edit.htm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/web/admin/templates/system_config_mail_edit.htm b/interface/web/admin/templates/system_config_mail_edit.htm index 526da2502a..e29c5f4428 100644 --- a/interface/web/admin/templates/system_config_mail_edit.htm +++ b/interface/web/admin/templates/system_config_mail_edit.htm @@ -29,6 +29,12 @@ {tmpl_var name='mailbox_show_custom_rules_tab'}
+
+ +
+ {tmpl_var name='mailbox_show_backup_tab'} +
+
-- GitLab From 9a54733aa3485fe7050cca9316211b4fd23c8513 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 16 Sep 2016 10:12:48 +0200 Subject: [PATCH 033/302] Update en_system_config.lng --- interface/web/admin/lib/lang/en_system_config.lng | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index 38f178f9f5..510f9b23ca 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -55,6 +55,7 @@ $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_mail_backup_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; -- GitLab From 6c727b07a758267fd453c8f04c6ee9651b2700cc Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 16 Sep 2016 10:27:07 +0200 Subject: [PATCH 034/302] Update system.ini.master --- install/tpl/system.ini.master | 1 + 1 file changed, 1 insertion(+) diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master index 81b33374b3..85c457c793 100644 --- a/install/tpl/system.ini.master +++ b/install/tpl/system.ini.master @@ -11,6 +11,7 @@ enable_custom_login=n mailbox_show_autoresponder_tab=y mailbox_show_mail_filter_tab=y mailbox_show_custom_rules_tab=y +mailbox_show_backup_tab=y mailboxlist_webmail_link=y webmail_url=/webmail dkim_path=/var/lib/amavis/dkim -- GitLab From 00cbcfb33039e08b58309485b95b4f67f3e934e1 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 16 Sep 2016 10:31:09 +0200 Subject: [PATCH 035/302] Update en_system_config.lng --- interface/web/admin/lib/lang/en_system_config.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index 510f9b23ca..63e9d9c604 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -55,7 +55,7 @@ $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; -$wb['mailbox_show_mail_backup_txt'] = 'Show backup tab in mail account details'; +$wb['mailbox_show_backup_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; -- GitLab From c381b76b6f9a167d25833752325568aeb56da8da Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 16 Sep 2016 10:35:17 +0200 Subject: [PATCH 036/302] Update en_system_config.lng --- interface/web/admin/lib/lang/en_system_config.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index 63e9d9c604..ea6df4cbca 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -55,7 +55,7 @@ $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; -$wb['mailbox_show_backup_txt'] = 'Show backup tab in mail account details'; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; -- GitLab From f82f5f71ba755783103a692071f7a7da7c54da66 Mon Sep 17 00:00:00 2001 From: Alex Wink Date: Fri, 16 Sep 2016 11:22:32 +0200 Subject: [PATCH 037/302] Fixed typo en_ftp_user.lng --- interface/web/sites/lib/lang/en_ftp_user.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/lib/lang/en_ftp_user.lng b/interface/web/sites/lib/lang/en_ftp_user.lng index 9d6a27fb68..2deefcb719 100644 --- a/interface/web/sites/lib/lang/en_ftp_user.lng +++ b/interface/web/sites/lib/lang/en_ftp_user.lng @@ -18,7 +18,7 @@ $wb["active_txt"] = 'Active'; $wb["limit_ftp_user_txt"] = 'The max. number of FTP users for your account is reached.'; $wb["username_error_empty"] = 'Username is empty.'; $wb["username_error_unique"] = 'The username must be unique.'; -$wb["username_error_regex"] = 'The username contains charachters that are not allowed.'; +$wb["username_error_regex"] = 'The username contains characters that are not allowed.'; $wb["quota_size_error_empty"] = 'Quota is empty.'; $wb["uid_error_empty"] = 'UID empty.'; $wb["uid_error_empty"] = 'GID empty.'; -- GitLab From 9b339d42f651c31f791b3725983d0957b29fb613 Mon Sep 17 00:00:00 2001 From: Alex Wink Date: Fri, 16 Sep 2016 11:45:21 +0200 Subject: [PATCH 038/302] [Added] username_error_regex to en_web_folder_user.lng --- interface/web/sites/lib/lang/en_web_folder_user.lng | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/sites/lib/lang/en_web_folder_user.lng b/interface/web/sites/lib/lang/en_web_folder_user.lng index 207f5367eb..7736d6132f 100644 --- a/interface/web/sites/lib/lang/en_web_folder_user.lng +++ b/interface/web/sites/lib/lang/en_web_folder_user.lng @@ -11,4 +11,5 @@ $wb['password_mismatch_txt'] = 'The passwords do not match.'; $wb['password_match_txt'] = 'The passwords do match.'; $wb["no_folder_perm"] = 'You have no permission for this folder.'; $wb['error_user_exists_already_txt'] = 'There is already a record for this user.'; +$wb["username_error_regex"] = 'The Username contains invalid characters.'; ?> \ No newline at end of file -- GitLab From 688fa43a350122a58b8bb28887fb6cf35a3afe1e Mon Sep 17 00:00:00 2001 From: Bruger Date: Mon, 19 Sep 2016 15:39:50 +0200 Subject: [PATCH 039/302] Add mailbox_show_backup_tab_txt for all languages --- .../web/admin/lib/lang/ar_system_config.lng | 3 +- .../web/admin/lib/lang/bg_system_config.lng | 3 +- .../web/admin/lib/lang/br_system_config.lng | 3 +- .../web/admin/lib/lang/ca_system_config.lng | 3 +- .../web/admin/lib/lang/cz_system_config.lng | 3 +- .../web/admin/lib/lang/de_system_config.lng | 3 +- .../web/admin/lib/lang/dk_system_config.lng | 3 +- .../web/admin/lib/lang/el_system_config.lng | 3 +- .../web/admin/lib/lang/en_system_config.lng | 177 +++++++++--------- .../web/admin/lib/lang/es_system_config.lng | 3 +- .../web/admin/lib/lang/fi_system_config.lng | 3 +- .../web/admin/lib/lang/fr_system_config.lng | 3 +- .../web/admin/lib/lang/hr_system_config.lng | 3 +- .../web/admin/lib/lang/hu_system_config.lng | 3 +- .../web/admin/lib/lang/id_system_config.lng | 3 +- .../web/admin/lib/lang/it_system_config.lng | 3 +- .../web/admin/lib/lang/ja_system_config.lng | 3 +- .../web/admin/lib/lang/nl_system_config.lng | 3 +- .../web/admin/lib/lang/pl_system_config.lng | 3 +- .../web/admin/lib/lang/pt_system_config.lng | 3 +- .../web/admin/lib/lang/ro_system_config.lng | 3 +- .../web/admin/lib/lang/ru_system_config.lng | 3 +- .../web/admin/lib/lang/se_system_config.lng | 3 +- .../web/admin/lib/lang/sk_system_config.lng | 3 +- .../web/admin/lib/lang/tr_system_config.lng | 3 +- 25 files changed, 137 insertions(+), 112 deletions(-) diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng index 45fb0fa9e9..01da9a66eb 100644 --- a/interface/web/admin/lib/lang/ar_system_config.lng +++ b/interface/web/admin/lib/lang/ar_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng index 2f4eb86d3c..fe8615d48a 100644 --- a/interface/web/admin/lib/lang/bg_system_config.lng +++ b/interface/web/admin/lib/lang/bg_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng index 556f696ccb..ca78cf9faf 100644 --- a/interface/web/admin/lib/lang/br_system_config.lng +++ b/interface/web/admin/lib/lang/br_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/ca_system_config.lng b/interface/web/admin/lib/lang/ca_system_config.lng index fa03990bc0..b03f773d89 100644 --- a/interface/web/admin/lib/lang/ca_system_config.lng +++ b/interface/web/admin/lib/lang/ca_system_config.lng @@ -27,7 +27,8 @@ $wb['enable_custom_login_txt'] = 'Allow custom login name'; $wb['mailboxlist_webmail_link_txt'] = 'Link to webmail in Mailbox list'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_txt'] = 'Webmail URL'; $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list'; $wb['mailmailinglist_url_txt'] = 'Mailing list URL'; diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng index 67aa4eb8a6..345a22e818 100644 --- a/interface/web/admin/lib/lang/cz_system_config.lng +++ b/interface/web/admin/lib/lang/cz_system_config.lng @@ -48,7 +48,8 @@ $wb['f5_to_reload_js_txt'] = 'Pokud vypnete tuto volbu, zřejmě budete muset po $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Ukázat kartu automatická odpověď v podrobnostech u e-mailové schránky'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Ukázat kartu e-mailové filtry v podrobnostech u e-mailové schránky'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Ukázat kartu vlastní pravidla v podrobnostech u e-mailové schránky'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Ukázat kartu vlastní pravidla v podrobnostech u e-mailové schránky';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Neplatný webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Zástupný symbol'; $wb['webmail_url_note_txt'] = 'Zástupný symbol'; diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng index 8620491ad4..ead4e61ff8 100644 --- a/interface/web/admin/lib/lang/de_system_config.lng +++ b/interface/web/admin/lib/lang/de_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Deaktiviere die Kunden Benutzer $wb['backups_include_into_web_quota_txt'] = 'Backups in Web Quota hinzuzählen.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Zeige Autoresponder Reiter in E-Mail Kontodetails'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Zeige E-Mail Filter Reiter in E-Mail Kontodetails'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Zeige Benutzerregel Reiter in E-Mail Kontodetails'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Zeige Benutzerregel Reiter in E-Mail Kontodetails';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Falsche Webmail URL'; $wb['reseller_can_use_options_txt'] = 'Reseller können den Optionen Reiter bei Webseiten verwenden'; $wb['phpmyadmin_url_note_txt'] = 'Platzhalter:'; diff --git a/interface/web/admin/lib/lang/dk_system_config.lng b/interface/web/admin/lib/lang/dk_system_config.lng index ec5a754826..79b46bbc19 100644 --- a/interface/web/admin/lib/lang/dk_system_config.lng +++ b/interface/web/admin/lib/lang/dk_system_config.lng @@ -48,7 +48,8 @@ $wb['f5_to_reload_js_txt'] = 'Hvis du ændrer dette, kan du blive nødt til at t $wb['client_username_web_check_disabled_txt'] = 'Deaktiver klient-brugernavns check for ordet \'web\'.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Vis autoresponder tab i mail kontooplysninger'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Vis mail filter tab i mail kontooplysninger'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Vis custom mailfilter tab i mail kontooplysninger'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Vis custom mailfilter tab i mail kontooplysninger';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Ugyldigt webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Pladsholder:'; $wb['webmail_url_note_txt'] = 'Pladsholder:'; diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng index 4dadc1290b..4250575238 100644 --- a/interface/web/admin/lib/lang/el_system_config.lng +++ b/interface/web/admin/lib/lang/el_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Απενεργοποίηση ε $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Εμφάνιση της καρτέλας Αυτόματης Απάντησης στις λεπτομέρειες του λογαριασμού mail'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Εμφάνιση της καρτέλας Φίλτρα mail στις λεπτομέρειες του λογαριασμού mail'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Εμφάνιση της καρτέλας Προσαρμοσμένοι Κανόνες στις λεπτομέρειες του λογαριασμού mail'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Εμφάνιση της καρτέλας Προσαρμοσμένοι Κανόνες στις λεπτομέρειες του λογαριασμού mail';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index ea6df4cbca..41d83695a0 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -1,88 +1,89 @@ - + diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng index cc81939cb3..155f659c07 100755 --- a/interface/web/admin/lib/lang/es_system_config.lng +++ b/interface/web/admin/lib/lang/es_system_config.lng @@ -34,7 +34,8 @@ $wb['ftpuser_prefix_error_regex'] = 'Carácter no permitido en el prefijo de usu $wb['ftpuser_prefix_txt'] = 'Prefijo del usuario de FTP'; $wb['login_link_error_regex'] = 'Enlace incorrecto para el inicio de sesión personalizado'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Mostrar la pestaña del auto-respondedor en los detalles de la cuenta de correo'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Mostrar la pestaña filtro de correo personalizado en los detalles de la cuenta de correo'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Mostrar la pestaña filtro de correo personalizado en los detalles de la cuenta de correo';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Mostrar la pestaña filtro de correo en los detalles de la cuenta de correo'; $wb['mailboxlist_webmail_link_txt'] = 'Vinculo a correo web en la lista de buzones de correo'; $wb['mailmailinglist_link_txt'] = 'Vínculo a la lista de correos en la lista de la Lista de correos'; diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng index c4987d01a3..d69687d322 100644 --- a/interface/web/admin/lib/lang/fi_system_config.lng +++ b/interface/web/admin/lib/lang/fi_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng index 5892e3a269..0c7da54cda 100644 --- a/interface/web/admin/lib/lang/fr_system_config.lng +++ b/interface/web/admin/lib/lang/fr_system_config.lng @@ -48,7 +48,8 @@ $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word ’web’.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng index e02ae57a20..debe904282 100644 --- a/interface/web/admin/lib/lang/hr_system_config.lng +++ b/interface/web/admin/lib/lang/hr_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng index d26fc5be2d..925efb7d2b 100644 --- a/interface/web/admin/lib/lang/hu_system_config.lng +++ b/interface/web/admin/lib/lang/hu_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng index c865dff3d8..01eac14b24 100644 --- a/interface/web/admin/lib/lang/id_system_config.lng +++ b/interface/web/admin/lib/lang/id_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng index 396503f02e..88ee0e0596 100644 --- a/interface/web/admin/lib/lang/it_system_config.lng +++ b/interface/web/admin/lib/lang/it_system_config.lng @@ -48,7 +48,8 @@ $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng index fc32081d96..b8705b4d02 100644 --- a/interface/web/admin/lib/lang/ja_system_config.lng +++ b/interface/web/admin/lib/lang/ja_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng index 5177888bb0..2c3249a1ad 100644 --- a/interface/web/admin/lib/lang/nl_system_config.lng +++ b/interface/web/admin/lib/lang/nl_system_config.lng @@ -18,7 +18,8 @@ $wb['dblist_phpmyadmin_link_txt'] = 'Link naar phpmyadmin in DB lijst'; $wb['mailboxlist_webmail_link_txt'] = 'Link naar webmail in Mailbox lijst'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_txt'] = 'Webmail URL'; $wb['phpmyadmin_url_txt'] = 'PHPMyAdmin URL'; $wb['use_domain_module_txt'] = 'Gebruik de domein-module om nieuwe domeinen toe te voegen'; diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng index cea6345e63..43b5ad1603 100644 --- a/interface/web/admin/lib/lang/pl_system_config.lng +++ b/interface/web/admin/lib/lang/pl_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Wyłącz sprawdzanie nazwy klie $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Pokaż zakładkę autorespondera w szczegółach konta email.'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Pokaż zakładkę filtra email w szczegółach konta email.'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Pokaż zakładkę własnych filtrów email w szczegółach konta email.'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Pokaż zakładkę własnych filtrów email w szczegółach konta email.';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng index 24ff94fca2..cc10a88803 100644 --- a/interface/web/admin/lib/lang/pt_system_config.lng +++ b/interface/web/admin/lib/lang/pt_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng index b258ee1870..b2a0407d1f 100644 --- a/interface/web/admin/lib/lang/ro_system_config.lng +++ b/interface/web/admin/lib/lang/ro_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng index 3de4044c44..8f077bd820 100644 --- a/interface/web/admin/lib/lang/ru_system_config.lng +++ b/interface/web/admin/lib/lang/ru_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng index 285f7807e8..98c3d11535 100644 --- a/interface/web/admin/lib/lang/se_system_config.lng +++ b/interface/web/admin/lib/lang/se_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Visa autosvarsfliken vid detaljerna för epostkonto'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Visa epostfilterfliken vid detaljerna för epostkonto'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng index be8789a803..f4cb20cabe 100644 --- a/interface/web/admin/lib/lang/sk_system_config.lng +++ b/interface/web/admin/lib/lang/sk_system_config.lng @@ -51,7 +51,8 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; $wb['webmail_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng index bbcb6a5ce2..2d2857679a 100644 --- a/interface/web/admin/lib/lang/tr_system_config.lng +++ b/interface/web/admin/lib/lang/tr_system_config.lng @@ -48,7 +48,8 @@ $wb['f5_to_reload_js_txt'] = 'Bu değer değiştirildiğinde, web tarayıcının $wb['client_username_web_check_disabled_txt'] = 'Müşteri kullanıcı adında \'web\' sözcüğü denetimi devre dışı bırakılsın.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Posta hesabı ayrıntılarında otoyanıtlayıcı sekmesi görüntülensin'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Posta hesabı ayrıntılarında posta süzgeci sekmesi görüntülensin'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Posta hesabı ayrıntılarında isteğe bağlı posta süzgeci sekmesi görüntülensin'; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Posta hesabı ayrıntılarında isteğe bağlı posta süzgeci sekmesi görüntülensin';; +$wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Webmail adresi geçersiz'; $wb['phpmyadmin_url_note_txt'] = 'Kod:'; $wb['webmail_url_note_txt'] = 'Kod:'; -- GitLab From a638fc821b31f94845adff59137a79b75546e0d6 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 19 Sep 2016 15:47:22 +0200 Subject: [PATCH 040/302] Removed extra ; --- interface/web/admin/lib/lang/ar_system_config.lng | 2 +- interface/web/admin/lib/lang/bg_system_config.lng | 2 +- interface/web/admin/lib/lang/br_system_config.lng | 2 +- interface/web/admin/lib/lang/ca_system_config.lng | 2 +- interface/web/admin/lib/lang/cz_system_config.lng | 2 +- interface/web/admin/lib/lang/de_system_config.lng | 2 +- interface/web/admin/lib/lang/dk_system_config.lng | 2 +- interface/web/admin/lib/lang/el_system_config.lng | 2 +- interface/web/admin/lib/lang/en_system_config.lng | 4 ++-- interface/web/admin/lib/lang/es_system_config.lng | 2 +- interface/web/admin/lib/lang/fi_system_config.lng | 2 +- interface/web/admin/lib/lang/fr_system_config.lng | 2 +- interface/web/admin/lib/lang/hr_system_config.lng | 2 +- interface/web/admin/lib/lang/hu_system_config.lng | 2 +- interface/web/admin/lib/lang/id_system_config.lng | 2 +- interface/web/admin/lib/lang/it_system_config.lng | 2 +- interface/web/admin/lib/lang/ja_system_config.lng | 2 +- interface/web/admin/lib/lang/nl_system_config.lng | 2 +- interface/web/admin/lib/lang/pl_system_config.lng | 2 +- interface/web/admin/lib/lang/pt_system_config.lng | 2 +- interface/web/admin/lib/lang/ro_system_config.lng | 2 +- interface/web/admin/lib/lang/ru_system_config.lng | 2 +- interface/web/admin/lib/lang/se_system_config.lng | 2 +- interface/web/admin/lib/lang/sk_system_config.lng | 2 +- interface/web/admin/lib/lang/tr_system_config.lng | 2 +- 25 files changed, 26 insertions(+), 26 deletions(-) diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng index 01da9a66eb..798d5cf6a2 100644 --- a/interface/web/admin/lib/lang/ar_system_config.lng +++ b/interface/web/admin/lib/lang/ar_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng index fe8615d48a..a30f49abb7 100644 --- a/interface/web/admin/lib/lang/bg_system_config.lng +++ b/interface/web/admin/lib/lang/bg_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng index ca78cf9faf..45cb7e1703 100644 --- a/interface/web/admin/lib/lang/br_system_config.lng +++ b/interface/web/admin/lib/lang/br_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/ca_system_config.lng b/interface/web/admin/lib/lang/ca_system_config.lng index b03f773d89..60fbb442a6 100644 --- a/interface/web/admin/lib/lang/ca_system_config.lng +++ b/interface/web/admin/lib/lang/ca_system_config.lng @@ -27,7 +27,7 @@ $wb['enable_custom_login_txt'] = 'Allow custom login name'; $wb['mailboxlist_webmail_link_txt'] = 'Link to webmail in Mailbox list'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_txt'] = 'Webmail URL'; $wb['mailmailinglist_link_txt'] = 'Link to mailing list in Mailing list list'; diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng index 345a22e818..dad928490b 100644 --- a/interface/web/admin/lib/lang/cz_system_config.lng +++ b/interface/web/admin/lib/lang/cz_system_config.lng @@ -48,7 +48,7 @@ $wb['f5_to_reload_js_txt'] = 'Pokud vypnete tuto volbu, zřejmě budete muset po $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Ukázat kartu automatická odpověď v podrobnostech u e-mailové schránky'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Ukázat kartu e-mailové filtry v podrobnostech u e-mailové schránky'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Ukázat kartu vlastní pravidla v podrobnostech u e-mailové schránky';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Ukázat kartu vlastní pravidla v podrobnostech u e-mailové schránky'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Neplatný webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Zástupný symbol'; diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng index ead4e61ff8..84fd847330 100644 --- a/interface/web/admin/lib/lang/de_system_config.lng +++ b/interface/web/admin/lib/lang/de_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Deaktiviere die Kunden Benutzer $wb['backups_include_into_web_quota_txt'] = 'Backups in Web Quota hinzuzählen.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Zeige Autoresponder Reiter in E-Mail Kontodetails'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Zeige E-Mail Filter Reiter in E-Mail Kontodetails'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Zeige Benutzerregel Reiter in E-Mail Kontodetails';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Zeige Benutzerregel Reiter in E-Mail Kontodetails'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Falsche Webmail URL'; $wb['reseller_can_use_options_txt'] = 'Reseller können den Optionen Reiter bei Webseiten verwenden'; diff --git a/interface/web/admin/lib/lang/dk_system_config.lng b/interface/web/admin/lib/lang/dk_system_config.lng index 79b46bbc19..1e5c3ada08 100644 --- a/interface/web/admin/lib/lang/dk_system_config.lng +++ b/interface/web/admin/lib/lang/dk_system_config.lng @@ -48,7 +48,7 @@ $wb['f5_to_reload_js_txt'] = 'Hvis du ændrer dette, kan du blive nødt til at t $wb['client_username_web_check_disabled_txt'] = 'Deaktiver klient-brugernavns check for ordet \'web\'.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Vis autoresponder tab i mail kontooplysninger'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Vis mail filter tab i mail kontooplysninger'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Vis custom mailfilter tab i mail kontooplysninger';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Vis custom mailfilter tab i mail kontooplysninger'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Ugyldigt webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Pladsholder:'; diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng index 4250575238..0fad4c234a 100644 --- a/interface/web/admin/lib/lang/el_system_config.lng +++ b/interface/web/admin/lib/lang/el_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Απενεργοποίηση ε $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Εμφάνιση της καρτέλας Αυτόματης Απάντησης στις λεπτομέρειες του λογαριασμού mail'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Εμφάνιση της καρτέλας Φίλτρα mail στις λεπτομέρειες του λογαριασμού mail'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Εμφάνιση της καρτέλας Προσαρμοσμένοι Κανόνες στις λεπτομέρειες του λογαριασμού mail';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Εμφάνιση της καρτέλας Προσαρμοσμένοι Κανόνες στις λεπτομέρειες του λογαριασμού mail'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index 41d83695a0..9f9e7f990b 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -27,7 +27,7 @@ $wb['enable_custom_login_txt'] = 'Allow custom login name'; $wb["mailboxlist_webmail_link_txt"] = 'Link to webmail in Mailbox list'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show Autoresponder tab in Mailbox detail'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show Mail Filter tab in Mailbox detail'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show Custom Rules tab in Mailbox detail';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show Custom Rules tab in Mailbox detail'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb["webmail_url_txt"] = 'Webmail URL'; $wb["mailmailinglist_link_txt"] = 'Link to mailing list in Mailing list list'; @@ -55,7 +55,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng index 155f659c07..805ccf6756 100755 --- a/interface/web/admin/lib/lang/es_system_config.lng +++ b/interface/web/admin/lib/lang/es_system_config.lng @@ -34,7 +34,7 @@ $wb['ftpuser_prefix_error_regex'] = 'Carácter no permitido en el prefijo de usu $wb['ftpuser_prefix_txt'] = 'Prefijo del usuario de FTP'; $wb['login_link_error_regex'] = 'Enlace incorrecto para el inicio de sesión personalizado'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Mostrar la pestaña del auto-respondedor en los detalles de la cuenta de correo'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Mostrar la pestaña filtro de correo personalizado en los detalles de la cuenta de correo';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Mostrar la pestaña filtro de correo personalizado en los detalles de la cuenta de correo'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Mostrar la pestaña filtro de correo en los detalles de la cuenta de correo'; $wb['mailboxlist_webmail_link_txt'] = 'Vinculo a correo web en la lista de buzones de correo'; diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng index d69687d322..731782f8ce 100644 --- a/interface/web/admin/lib/lang/fi_system_config.lng +++ b/interface/web/admin/lib/lang/fi_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng index 0c7da54cda..94a2a3681a 100644 --- a/interface/web/admin/lib/lang/fr_system_config.lng +++ b/interface/web/admin/lib/lang/fr_system_config.lng @@ -48,7 +48,7 @@ $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word ’web’.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng index debe904282..5ee3474835 100644 --- a/interface/web/admin/lib/lang/hr_system_config.lng +++ b/interface/web/admin/lib/lang/hr_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng index 925efb7d2b..efd747fc83 100644 --- a/interface/web/admin/lib/lang/hu_system_config.lng +++ b/interface/web/admin/lib/lang/hu_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng index 01eac14b24..09b110ca26 100644 --- a/interface/web/admin/lib/lang/id_system_config.lng +++ b/interface/web/admin/lib/lang/id_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng index 88ee0e0596..8519676847 100644 --- a/interface/web/admin/lib/lang/it_system_config.lng +++ b/interface/web/admin/lib/lang/it_system_config.lng @@ -48,7 +48,7 @@ $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng index b8705b4d02..7eb5c5d55a 100644 --- a/interface/web/admin/lib/lang/ja_system_config.lng +++ b/interface/web/admin/lib/lang/ja_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng index 2c3249a1ad..d98ecaaaeb 100644 --- a/interface/web/admin/lib/lang/nl_system_config.lng +++ b/interface/web/admin/lib/lang/nl_system_config.lng @@ -18,7 +18,7 @@ $wb['dblist_phpmyadmin_link_txt'] = 'Link naar phpmyadmin in DB lijst'; $wb['mailboxlist_webmail_link_txt'] = 'Link naar webmail in Mailbox lijst'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_txt'] = 'Webmail URL'; $wb['phpmyadmin_url_txt'] = 'PHPMyAdmin URL'; diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng index 43b5ad1603..993bdbb4b7 100644 --- a/interface/web/admin/lib/lang/pl_system_config.lng +++ b/interface/web/admin/lib/lang/pl_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Wyłącz sprawdzanie nazwy klie $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Pokaż zakładkę autorespondera w szczegółach konta email.'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Pokaż zakładkę filtra email w szczegółach konta email.'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Pokaż zakładkę własnych filtrów email w szczegółach konta email.';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Pokaż zakładkę własnych filtrów email w szczegółach konta email.'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng index cc10a88803..187550de3e 100644 --- a/interface/web/admin/lib/lang/pt_system_config.lng +++ b/interface/web/admin/lib/lang/pt_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng index b2a0407d1f..a94250d6fb 100644 --- a/interface/web/admin/lib/lang/ro_system_config.lng +++ b/interface/web/admin/lib/lang/ro_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng index 8f077bd820..7c9fecdf42 100644 --- a/interface/web/admin/lib/lang/ru_system_config.lng +++ b/interface/web/admin/lib/lang/ru_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng index 98c3d11535..51fb30b9ba 100644 --- a/interface/web/admin/lib/lang/se_system_config.lng +++ b/interface/web/admin/lib/lang/se_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Visa autosvarsfliken vid detaljerna för epostkonto'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Visa epostfilterfliken vid detaljerna för epostkonto'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng index f4cb20cabe..b088424c8a 100644 --- a/interface/web/admin/lib/lang/sk_system_config.lng +++ b/interface/web/admin/lib/lang/sk_system_config.lng @@ -51,7 +51,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Invalid webmail URL'; $wb['phpmyadmin_url_note_txt'] = 'Placeholder:'; diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng index 2d2857679a..7a2a5195d9 100644 --- a/interface/web/admin/lib/lang/tr_system_config.lng +++ b/interface/web/admin/lib/lang/tr_system_config.lng @@ -48,7 +48,7 @@ $wb['f5_to_reload_js_txt'] = 'Bu değer değiştirildiğinde, web tarayıcının $wb['client_username_web_check_disabled_txt'] = 'Müşteri kullanıcı adında \'web\' sözcüğü denetimi devre dışı bırakılsın.'; $wb['mailbox_show_autoresponder_tab_txt'] = 'Posta hesabı ayrıntılarında otoyanıtlayıcı sekmesi görüntülensin'; $wb['mailbox_show_mail_filter_tab_txt'] = 'Posta hesabı ayrıntılarında posta süzgeci sekmesi görüntülensin'; -$wb['mailbox_show_custom_rules_tab_txt'] = 'Posta hesabı ayrıntılarında isteğe bağlı posta süzgeci sekmesi görüntülensin';; +$wb['mailbox_show_custom_rules_tab_txt'] = 'Posta hesabı ayrıntılarında isteğe bağlı posta süzgeci sekmesi görüntülensin'; $wb['mailbox_show_backup_tab_txt'] = 'Show backup tab in mail account details'; $wb['webmail_url_error_regex'] = 'Webmail adresi geçersiz'; $wb['phpmyadmin_url_note_txt'] = 'Kod:'; -- GitLab From dee37400f60c38cf239c3d09eb13411bf56846ce Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 27 Sep 2016 21:06:01 +0200 Subject: [PATCH 041/302] Added all distros configurations --- install/dist/conf/centos52.conf.php | 4 ++++ install/dist/conf/centos53.conf.php | 4 ++++ install/dist/conf/centos70.conf.php | 4 ++++ install/dist/conf/centos72.conf.php | 4 ++++ install/dist/conf/debiantesting.conf.php | 4 ++++ install/dist/conf/fedora9.conf.php | 4 ++++ install/dist/conf/gentoo.conf.php | 4 ++++ install/dist/conf/opensuse110.conf.php | 4 ++++ install/dist/conf/opensuse112.conf.php | 4 ++++ install/dist/conf/ubuntu1604.conf.php | 4 ++++ install/update.php | 2 +- 11 files changed, 41 insertions(+), 1 deletion(-) diff --git a/install/dist/conf/centos52.conf.php b/install/dist/conf/centos52.conf.php index 12044d3ce0..77462bd7f4 100644 --- a/install/dist/conf/centos52.conf.php +++ b/install/dist/conf/centos52.conf.php @@ -118,6 +118,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/centos53.conf.php b/install/dist/conf/centos53.conf.php index 12044d3ce0..77462bd7f4 100644 --- a/install/dist/conf/centos53.conf.php +++ b/install/dist/conf/centos53.conf.php @@ -118,6 +118,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/centos70.conf.php b/install/dist/conf/centos70.conf.php index a40e88ed70..c3076c4aab 100644 --- a/install/dist/conf/centos70.conf.php +++ b/install/dist/conf/centos70.conf.php @@ -118,6 +118,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/centos72.conf.php b/install/dist/conf/centos72.conf.php index e7ab6030b7..b6cbcabe21 100644 --- a/install/dist/conf/centos72.conf.php +++ b/install/dist/conf/centos72.conf.php @@ -118,6 +118,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/debiantesting.conf.php b/install/dist/conf/debiantesting.conf.php index 92787bf428..fdf8310918 100644 --- a/install/dist/conf/debiantesting.conf.php +++ b/install/dist/conf/debiantesting.conf.php @@ -120,6 +120,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/fedora9.conf.php b/install/dist/conf/fedora9.conf.php index 80539a7859..85121e7c84 100644 --- a/install/dist/conf/fedora9.conf.php +++ b/install/dist/conf/fedora9.conf.php @@ -118,6 +118,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/gentoo.conf.php b/install/dist/conf/gentoo.conf.php index 2955cfa71d..83a487f290 100644 --- a/install/dist/conf/gentoo.conf.php +++ b/install/dist/conf/gentoo.conf.php @@ -131,6 +131,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['user'] = 'getmail'; diff --git a/install/dist/conf/opensuse110.conf.php b/install/dist/conf/opensuse110.conf.php index e389c3b2a0..909a53aba0 100644 --- a/install/dist/conf/opensuse110.conf.php +++ b/install/dist/conf/opensuse110.conf.php @@ -118,6 +118,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/opensuse112.conf.php b/install/dist/conf/opensuse112.conf.php index fa0504652e..648a9222e4 100644 --- a/install/dist/conf/opensuse112.conf.php +++ b/install/dist/conf/opensuse112.conf.php @@ -118,6 +118,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/dist/conf/ubuntu1604.conf.php b/install/dist/conf/ubuntu1604.conf.php index 92787bf428..fdf8310918 100644 --- a/install/dist/conf/ubuntu1604.conf.php +++ b/install/dist/conf/ubuntu1604.conf.php @@ -120,6 +120,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; +//* mlmmj +$conf['mlmmj']['installed'] = false; // will be detected automatically during installation +$conf['mlmmj']['config_dir'] = '/etc/mlmmj'; + //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; diff --git a/install/update.php b/install/update.php index 7082148957..44d77f2a69 100644 --- a/install/update.php +++ b/install/update.php @@ -357,7 +357,7 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel } //* Configure mlmmj - if($conf['mlmmj']['installed'] == true && $inst->reconfigure_app('Mlmmj', $reconfigure_services_answer)) ) { + if($conf['mlmmj']['installed'] == true && $inst->reconfigure_app('Mlmmj', $reconfigure_services_answer)) { swriteln('Configuring Mlmmj'); $inst->configure_mlmmj(/*update*/); } -- GitLab From 3e5045ab3a1b1ba80d54865e176bdc26ea96e54c Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 27 Sep 2016 21:06:35 +0200 Subject: [PATCH 042/302] Improved languages ...and italian translations --- .../web/mail/lib/lang/en_mail_mailinglist.lng | 76 ++++++------------- .../web/mail/lib/lang/it_mail_mailinglist.lng | 44 ++++++++++- 2 files changed, 67 insertions(+), 53 deletions(-) diff --git a/interface/web/mail/lib/lang/en_mail_mailinglist.lng b/interface/web/mail/lib/lang/en_mail_mailinglist.lng index 6e9e7c4019..af324b5e60 100644 --- a/interface/web/mail/lib/lang/en_mail_mailinglist.lng +++ b/interface/web/mail/lib/lang/en_mail_mailinglist.lng @@ -1,4 +1,25 @@ \ No newline at end of file +$wb['archive_desc_txt'] = 'If checked, the mail will be saved in the archive and not simply deleted'; \ No newline at end of file diff --git a/interface/web/mail/lib/lang/it_mail_mailinglist.lng b/interface/web/mail/lib/lang/it_mail_mailinglist.lng index c04b999381..6dab0d3e41 100644 --- a/interface/web/mail/lib/lang/it_mail_mailinglist.lng +++ b/interface/web/mail/lib/lang/it_mail_mailinglist.lng @@ -19,4 +19,46 @@ $wb['password_match_txt'] = 'Le password coincidono.'; $wb['listname_error_unique'] = 'There is already a mailinlist with name on the server. Please choose a different listname.'; $wb['email_error_isemail'] = 'Email address is invalid.'; $wb['mailinglist_txt'] = 'Mailing list'; -?> + +$wb['heading_general_txt'] = 'General'; + +/** MLMMJ **/ +$wb['heading_subscription_txt'] = 'Sottoscrizione'; +$wb['heading_removal_txt'] = 'Rimozione'; +$wb['admins_txt'] = 'Email amministratori'; +$wb['admins_desc_txt'] = 'Gli indirizzi email aggiuntivi che ricevono mail a list name+admin@listdomain.ltd'; + +$wb['subscribers_txt'] = 'Membri'; +$wb['subscribers_desc_txt'] = 'Gli indirizzi email sottoscritti alla lista'; + +$wb['prefix_txt'] = 'Prefisso oggetto'; +$wb['prefix_desc_txt'] = 'Questo modificherà la linea Subject: e aggiunge un prefisso se non è già presente'; + +$wb['mail_footer_txt'] = 'Piè di pagina'; +$wb['mail_footer_desc_txt'] = 'Questo contenuto è appeso alla mail inviata alla lista'; + +$wb['subscribe_policy_txt'] = 'Politiche di Sottoscrizione'; +$wb['sub_disabled_txt'] = 'Disabilitato'; +$wb['sub_confirm_txt'] = 'Conferma'; +$wb['sub_approval_txt'] = 'Richiesta approvazione'; +$wb['sub_both_txt'] = 'Conferma ed approva'; +$wb['sub_none_txt'] = 'Senza limiti'; + +$wb['posting_policy_txt'] = 'Politiche di invio'; +$wb['post_free_txt'] = 'Libero'; +$wb['post_closed_txt'] = 'Chiuso'; +$wb['post_moderated_txt'] = 'Moderato'; + +$wb['list_type_txt'] = 'Tipo di lista'; +$wb['type_open_txt'] = 'Aperta'; +$wb['type_closed_txt'] = 'Chiusa'; + +$wb['digestsub_txt'] = 'Abilitato'; +$wb['digesttext_txt'] = 'Sommario discussione'; +$wb['digestinterval_txt'] = 'Intervallo'; +$wb['digestinterval_desc_txt'] = 'Specifica quanti giorni dovranno passare prima che la prossima raccolta sia inviata. Il valore predefinito è 7 giorni'; +$wb['digestmaxmails_txt'] = 'Mail massime'; +$wb['digestmaxmails_desc_txt'] = 'Specifica quante mail si possono accumulare prima che l\'invio della raccolta venga attivato. Il valore predefinito è 50 mail, che siginifica che se 50 mail arrivano alla lista prima che l\'intervallo della raccolta sia passato, questa viene inviata'; + +$wb['archive_txt'] = 'Archive'; +$wb['archive_desc_txt'] = 'If checked, the mail will be saved in the archive and not simply deleted'; \ No newline at end of file -- GitLab From 65b91c6cb4748ff3a5adb093f9b65076e9709f40 Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 27 Sep 2016 21:06:56 +0200 Subject: [PATCH 043/302] Implemented ML deletion --- server/plugins-available/mlmmj_plugin.inc.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php index 9c074df846..15c434c831 100644 --- a/server/plugins-available/mlmmj_plugin.inc.php +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -225,7 +225,24 @@ class mlmmj_plugin { $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; if($mlManager == 'mlmmj') { - $a=0; + $mlConf = $this->getMlConfig(); + $rec = $data['old']; + $listDomain = $rec['domain']; + $listName = $rec['listname']; + $listDir = $mlConf['spool_dir']."/$listDomain/$listName"; + + // Remove ML directory structure + $this->rmdirR($listDir); + @rmdir($mlConf['spool_dir']."/$listDomain"); + + // Removing alias entry + $this->delMapEntry("$listName: \"|/usr/bin/mlmmj-recieve -L $listDir/\"", self::ML_ALIAS); + + // Removing transport entry + $this->delMapEntry("$listDomain--$listName@localhost.mlmmj mlmmj:$listDomain/$listName", self::ML_TRANSPORT); + + // Removing virtual entry + $this->delMapEntry("$listName@$listDomain $listDomain--$listName@localhost.mlmmj", self::ML_VIRTUAL); } } @@ -233,7 +250,7 @@ class mlmmj_plugin { $mlConfig = @parse_ini_file($this->mlmmj_config_dir.'mlmmj.conf'); // Force PHP7 to use # to mark comments - if(PHP_MAJOR_VERSION >= 7) + if(PHP_MAJOR_VERSION >= 7 && is_array($mlConfig)) $mlConfig = array_filter($mlConfig, function($v){return(substr($v,0,1)!=='#');}, ARRAY_FILTER_USE_KEY); return $mlConfig; -- GitLab From 6aa0750e6faf5de49548a6b1fcc4c9f0b05e48ef Mon Sep 17 00:00:00 2001 From: kolorafa Date: Wed, 28 Sep 2016 17:22:23 +0200 Subject: [PATCH 044/302] RewriteCond: bad flag delimiters --- server/conf/vhost.conf.master | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index ed591c9e45..a2c3817c6b 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -416,17 +416,23 @@ RewriteCond %{HTTP_HOST} ^$ [NC] - RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + + RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + RewriteRule ^(.*)$ https://$1 [R=301,NE,L] RewriteCond %{HTTP_HOST} ^$ [NC] - RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + + RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + RewriteRule ^(.*)$ https://$1 [R=301,NE,L] RewriteCond %{HTTP_HOST} $ [NC] - RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + + RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + RewriteCond %{REQUEST_URI} !^/webdav/ RewriteCond %{REQUEST_URI} !^/php5-fcgi/ -- GitLab From bfb75cdae12bc3ebb119ecb2efa8a5907d7e4b8b Mon Sep 17 00:00:00 2001 From: Michele Date: Thu, 29 Sep 2016 15:27:08 +0200 Subject: [PATCH 045/302] Italian language fixes --- interface/web/mail/lib/lang/it_mail_domain.lng | 2 +- interface/web/mail/lib/lang/it_mail_mailinglist.lng | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/mail/lib/lang/it_mail_domain.lng b/interface/web/mail/lib/lang/it_mail_domain.lng index 46089adb90..6680c53fc3 100644 --- a/interface/web/mail/lib/lang/it_mail_domain.lng +++ b/interface/web/mail/lib/lang/it_mail_domain.lng @@ -6,7 +6,7 @@ $wb['active_txt'] = 'Attivo'; $wb['domain_error_empty'] = 'Dominio vuoto.'; $wb['domain_error_unique'] = 'Dominio duplicato.'; $wb['domain_error_regex'] = 'Nome dominio non valido.'; -$wb['client_txt'] = 'Cleient'; +$wb['client_txt'] = 'Cliente'; $wb['limit_maildomain_txt'] = 'Raggiunto numero massimo di domini email per questo account.'; $wb['policy_txt'] = 'Filtro Spam'; $wb['no_policy'] = '- non abilitato -'; diff --git a/interface/web/mail/lib/lang/it_mail_mailinglist.lng b/interface/web/mail/lib/lang/it_mail_mailinglist.lng index 6dab0d3e41..e8b918649f 100644 --- a/interface/web/mail/lib/lang/it_mail_mailinglist.lng +++ b/interface/web/mail/lib/lang/it_mail_mailinglist.lng @@ -60,5 +60,5 @@ $wb['digestinterval_desc_txt'] = 'Specifica quanti giorni dovranno passare prima $wb['digestmaxmails_txt'] = 'Mail massime'; $wb['digestmaxmails_desc_txt'] = 'Specifica quante mail si possono accumulare prima che l\'invio della raccolta venga attivato. Il valore predefinito è 50 mail, che siginifica che se 50 mail arrivano alla lista prima che l\'intervallo della raccolta sia passato, questa viene inviata'; -$wb['archive_txt'] = 'Archive'; +$wb['archive_txt'] = 'Archivia'; $wb['archive_desc_txt'] = 'If checked, the mail will be saved in the archive and not simply deleted'; \ No newline at end of file -- GitLab From 93882bbba8b4065c90875c2da187870c45ef8022 Mon Sep 17 00:00:00 2001 From: Michele Date: Thu, 29 Sep 2016 17:30:41 +0200 Subject: [PATCH 046/302] Improved translations --- interface/web/mail/lib/lang/en_mail_mailinglist.lng | 8 +++++++- interface/web/mail/lib/lang/it_mail_mailinglist.lng | 12 +++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/interface/web/mail/lib/lang/en_mail_mailinglist.lng b/interface/web/mail/lib/lang/en_mail_mailinglist.lng index af324b5e60..d432b32d56 100644 --- a/interface/web/mail/lib/lang/en_mail_mailinglist.lng +++ b/interface/web/mail/lib/lang/en_mail_mailinglist.lng @@ -61,4 +61,10 @@ $wb['digestmaxmails_txt'] = 'Max mails'; $wb['digestmaxmails_desc_txt'] = 'Specifies how many mails can accumulate before digest sending is triggered. Defaults to 50 mails, meaning that if 50 mails arrive to the list before digestinterval have passed, the digest is delivered'; $wb['archive_txt'] = 'Archive'; -$wb['archive_desc_txt'] = 'If checked, the mail will be saved in the archive and not simply deleted'; \ No newline at end of file +$wb['archive_desc_txt'] = 'If checked, the mail will be saved in the archive and not simply deleted'; + +$wb['welcomeMsg_txt'] = 'Welcome message'; +$wb['goodbyeMsg_txt'] = 'Goodbye message'; + +$wb['open_list_txt'] = 'Open'; +$wb['closed_list_txt'] = 'Closed'; \ No newline at end of file diff --git a/interface/web/mail/lib/lang/it_mail_mailinglist.lng b/interface/web/mail/lib/lang/it_mail_mailinglist.lng index e8b918649f..fab43cf0ed 100644 --- a/interface/web/mail/lib/lang/it_mail_mailinglist.lng +++ b/interface/web/mail/lib/lang/it_mail_mailinglist.lng @@ -23,6 +23,10 @@ $wb['mailinglist_txt'] = 'Mailing list'; $wb['heading_general_txt'] = 'General'; /** MLMMJ **/ +$wb['Options'] = 'Opzioni'; +$wb['Membership'] = 'Membri'; +$wb['Digest'] = 'Raccolta'; + $wb['heading_subscription_txt'] = 'Sottoscrizione'; $wb['heading_removal_txt'] = 'Rimozione'; $wb['admins_txt'] = 'Email amministratori'; @@ -61,4 +65,10 @@ $wb['digestmaxmails_txt'] = 'Mail massime'; $wb['digestmaxmails_desc_txt'] = 'Specifica quante mail si possono accumulare prima che l\'invio della raccolta venga attivato. Il valore predefinito è 50 mail, che siginifica che se 50 mail arrivano alla lista prima che l\'intervallo della raccolta sia passato, questa viene inviata'; $wb['archive_txt'] = 'Archivia'; -$wb['archive_desc_txt'] = 'If checked, the mail will be saved in the archive and not simply deleted'; \ No newline at end of file +$wb['archive_desc_txt'] = 'If checked, the mail will be saved in the archive and not simply deleted'; + +$wb['welcomeMsg_txt'] = 'Messaggio di benvenuto'; +$wb['goodbyeMsg_txt'] = 'Messaggio di addio'; + +$wb['open_list_txt'] = 'Aperta'; +$wb['closed_list_txt'] = 'Chiusa'; \ No newline at end of file -- GitLab From 200ebd2683acfd25b097e8ba18147c10431a634a Mon Sep 17 00:00:00 2001 From: Michele Date: Thu, 29 Sep 2016 17:31:46 +0200 Subject: [PATCH 047/302] Modified version of ISEMAIL validator to manage multivalue fields --- interface/lib/classes/tform_base.inc.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 15b3fc59a2..2e2b314ee1 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -541,7 +541,7 @@ class tform_base { foreach($field['value'] as $k => $v) { $checked = ($k == $val)?' CHECKED':''; //$out .= "\r\n"; - $out .= "\r\n"; + $out .= "\r\n"; $elementNo++; } } @@ -671,7 +671,7 @@ class tform_base { foreach($field['value'] as $k => $v) { $checked = ($k == $field["default"])?' CHECKED':''; //$out .= "\r\n"; - $out .= "\r\n"; + $out .= "\r\n"; $elementNo++; } } @@ -1022,13 +1022,22 @@ class tform_base { //* Do nothing } else { if(function_exists('filter_var')) { - if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) { - $error = true; - } else { - if (!preg_match("/^[^\\+]+$/", $field_value)) { // * disallow + in local-part + + //* When the field may contain several email addresses, split them by the char defined as separator + if(isset($validator['separator']) && $validator['separator'] != '') + $field_value_array = explode($validator['separator'], $field_value); + else $field_value_array[] = $field_value; + + foreach($field_value_array AS $field_value) { + //* FIXME: Maybe it it's no good to alter the field value, but with multiline field we get adresses with carriege-return at the end + $field_value = trim($field_value); + if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) { + $error = true; + } elseif (!preg_match("/^[^\\+]+$/", $field_value)) { // * disallow + in local-part $error = true; } } + if ($error) { $errmsg = $validator['errmsg']; if(isset($this->wordbook[$errmsg])) { -- GitLab From d680f5283591067822e4823ffa146b3366c8d6d8 Mon Sep 17 00:00:00 2001 From: cybernet Date: Wed, 5 Oct 2016 14:48:14 +0200 Subject: [PATCH 048/302] Create/Delete Secondary DNS with remote API #4242 i just added a proposed code on howtoforge https://www.howtoforge.com/community/threads/create-delete-secondary-dns-with-remote-api.74136/ --- interface/lib/classes/remote.d/dns.inc.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index 57f7040e28..c12365bfd8 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -1,7 +1,7 @@ remoting_lib->loadFormDef('../dns/form/dns_soa.tform.php'); return $app->remoting_lib->getDataRecord($primary_id); } + + //* Add a slave zone + public function dns_slave_add($session_id, $client_id, $params) + { + if(!$this->checkPerm($session_id, 'dns_zone_add')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + return $this->insertQuery('../dns/form/dns_slave.tform.php', $client_id, $params); + } + + //* Delete a slave zone + public function dns_slave_delete($session_id, $primary_id) + { + if(!$this->checkPerm($session_id, 'dns_zone_delete')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + return $this->deleteQuery('../dns/form/dns_slave.tform.php', $primary_id); + } //* Get record id by origin public function dns_zone_get_id($session_id, $origin) -- GitLab From e9f8f7ec2d202697d9e6829bc75fb7409f106f04 Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 11 Oct 2016 00:50:34 +0200 Subject: [PATCH 049/302] Fixing minor bug --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index f88cffe898..963050c015 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -877,7 +877,7 @@ class installer_base { copy($conf['postfix']['config_dir'].'/master.cf', $conf['postfix']['config_dir'].'/master.cf~mlmmj'); $content .= "\n# mlmmj mailing lists\n"; $content .= "mlmmj unix - n n - - pipe\n"; - $content .= " flags=ORhu user=mlmmj argv=/usr/bin/mlmmj-receive -F -L /var/"; + $content .= " flags=ORhu user=mlmmj argv=/usr/bin/mlmmj-receive -F -L "; $content .= $mlConfig['spool_dir']."/\$nexthop\n\n"; wf($conf['postfix']['config_dir'].'/master.cf', $content); } -- GitLab From c81f8ac48328bda6a6f5b027ec36829ce76c6ed1 Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 11 Oct 2016 00:51:11 +0200 Subject: [PATCH 050/302] Removing useless template file --- .../templates/mail_mailinglist_membership.htm | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 interface/web/mail/templates/mail_mailinglist_membership.htm diff --git a/interface/web/mail/templates/mail_mailinglist_membership.htm b/interface/web/mail/templates/mail_mailinglist_membership.htm deleted file mode 100644 index 2d3e012e5d..0000000000 --- a/interface/web/mail/templates/mail_mailinglist_membership.htm +++ /dev/null @@ -1,65 +0,0 @@ - -

- -Membership management - -
-
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- - - -
- - -
\ No newline at end of file -- GitLab From d871dad79b00014734b025223a2657f20e111f18 Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 11 Oct 2016 00:51:38 +0200 Subject: [PATCH 051/302] Adding membership management for mlmmj --- interface/lib/lang/en.lng | 3 + interface/lib/lang/it.lng | 3 + .../web/mail/form/mail_mailinglist.tform.php | 27 +-- .../mail/form/mail_ml_membership.tform.php | 131 ++++++++++++++ .../lib/lang/en_imail_ml_membership_list.lng | 5 + .../mail/lib/lang/en_mail_ml_membership.lng | 10 ++ .../lib/lang/en_mail_ml_membership_list.lng | 5 + .../mail/lib/lang/it_mail_ml_membership.lng | 8 + .../lib/lang/it_mail_ml_membership_list.lng | 16 ++ interface/web/mail/lib/module.conf.php | 7 + .../web/mail/list/mail_ml_membership.list.php | 93 ++++++++++ interface/web/mail/mail_ml_membership_del.php | 63 +++++++ .../web/mail/mail_ml_membership_edit.php | 105 +++++++++++ .../web/mail/mail_ml_membership_list.php | 40 +++++ .../mail/templates/mail_mailinglist_edit.htm | 167 +++++++++--------- .../templates/mail_ml_membership_edit.htm | 64 +++++++ .../templates/mail_ml_membership_list.htm | 75 ++++++++ server/mods-available/mail_module.inc.php | 11 +- server/plugins-available/mlmmj_plugin.inc.php | 74 +++++++- 19 files changed, 800 insertions(+), 107 deletions(-) create mode 100755 interface/web/mail/form/mail_ml_membership.tform.php create mode 100644 interface/web/mail/lib/lang/en_imail_ml_membership_list.lng create mode 100755 interface/web/mail/lib/lang/en_mail_ml_membership.lng create mode 100644 interface/web/mail/lib/lang/en_mail_ml_membership_list.lng create mode 100755 interface/web/mail/lib/lang/it_mail_ml_membership.lng create mode 100644 interface/web/mail/lib/lang/it_mail_ml_membership_list.lng create mode 100644 interface/web/mail/list/mail_ml_membership.list.php create mode 100644 interface/web/mail/mail_ml_membership_del.php create mode 100755 interface/web/mail/mail_ml_membership_edit.php create mode 100644 interface/web/mail/mail_ml_membership_list.php create mode 100644 interface/web/mail/templates/mail_ml_membership_edit.htm create mode 100644 interface/web/mail/templates/mail_ml_membership_list.htm diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index 680561fce1..95d0abe238 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -122,6 +122,9 @@ $wb['datalog_status_d_mail_get'] = 'Delete mail fetcher account'; $wb['datalog_status_i_mail_mailinglist'] = 'Create mailing list'; $wb['datalog_status_u_mail_mailinglist'] = 'Update mailing list'; $wb['datalog_status_d_mail_mailinglist'] = 'Delete mailing list'; +$wb['datalog_status_i_mail_ml_membership'] = 'Create mailing list member'; +$wb['datalog_status_u_mail_ml_membership'] = 'Update mailing list member'; +$wb['datalog_status_d_mail_ml_membership'] = 'Delete mailing list member'; $wb['datalog_status_i_shell_user'] = 'Create shell user'; $wb['datalog_status_u_shell_user'] = 'Update shell user'; $wb['datalog_status_d_shell_user'] = 'Delete shell user'; diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng index 2db3c935ce..e67d0bcb4e 100644 --- a/interface/lib/lang/it.lng +++ b/interface/lib/lang/it.lng @@ -114,6 +114,9 @@ $wb['datalog_status_d_cron'] = 'Elimina cron job'; $wb['datalog_status_i_mail_mailinglist'] = 'Crea mailing list'; $wb['datalog_status_u_mail_mailinglist'] = 'Aggiorna mailing list'; $wb['datalog_status_d_mail_mailinglist'] = 'Elimina mailing list'; +$wb['datalog_status_i_mail_ml_membership'] = 'Crea membro di mailing list'; +$wb['datalog_status_u_mail_ml_membership'] = 'Aggiorna membro di mailing list'; +$wb['datalog_status_d_mail_ml_membership'] = 'Elimina membro di mailing list'; $wb['datalog_status_i_shell_user'] = 'Crea utente shell'; $wb['datalog_status_u_shell_user'] = 'Aggiorna utente shell'; $wb['datalog_status_d_shell_user'] = 'Elimina utente shell'; diff --git a/interface/web/mail/form/mail_mailinglist.tform.php b/interface/web/mail/form/mail_mailinglist.tform.php index 66337f4535..643961861b 100644 --- a/interface/web/mail/form/mail_mailinglist.tform.php +++ b/interface/web/mail/form/mail_mailinglist.tform.php @@ -167,6 +167,12 @@ if($mlManager == 'mlmmj') { 'admins' => array ( 'datatype' => 'TEXT', 'formtype' => 'TEXTAREA', + 'validators' => array ( + 0 => array ( 'type' => 'ISEMAIL', + 'allowempty' => 'y', + 'separator' => "\n", + 'errmsg'=> 'email_error_isemail'), + ), 'cols' => '30', 'rows' => '5' ), @@ -193,24 +199,6 @@ if($mlManager == 'mlmmj') { ) ); - $form["tabs"]['membership'] = array ( - 'title' => "Membership", - 'width' => 100, - 'template' => "templates/mail_mailinglist_membership.htm", - 'fields' => array ( - //################################# - // Begin Datatable fields - //################################# -// 'membership' => array ( -// 'datatype' => 'TEXT', -// 'formtype' => 'TEXTAREA', -// 'cols' => '30', -// 'rows' => '5' -// ), - ) - ); - - $form["tabs"]['privacy'] = array ( 'title' => "Privacy", 'width' => 100, @@ -225,8 +213,7 @@ if($mlManager == 'mlmmj') { 'regex' => '', 'errmsg' => '', 'default' => 'user', - 'value' => array ('open' => 'Open', 'closed' => 'Closed'), - 'separator' => '', + 'value' => array ('open' => 'open_list_txt', 'closed' => 'closed_list_txt'), 'width' => '30', 'maxlength' => '255', 'rows' => '', diff --git a/interface/web/mail/form/mail_ml_membership.tform.php b/interface/web/mail/form/mail_ml_membership.tform.php new file mode 100755 index 0000000000..4a1832d3dc --- /dev/null +++ b/interface/web/mail/form/mail_ml_membership.tform.php @@ -0,0 +1,131 @@ +uses('getconf'); +$mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; + +$form["title"] = "Mailing List"; +$form["description"] = ""; +$form["name"] = "mail_ml_membership"; +$form["action"] = "mail_ml_membership_edit.php"; +$form["db_table"] = "mail_ml_membership"; +$form["db_table_idx"] = "subscriber_id"; +$form["db_history"] = "yes"; +$form["tab_default"] = "membership"; +$form["list_default"] = "mail_ml_membership_list.php"; +$form["auth"] = 'yes'; // yes / no + +$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user +$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user +$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete +$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete +$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete + +$form["tabs"]['membership'] = array ( + 'title' => "Membership", + 'width' => 100, + 'template' => "templates/mail_ml_membership_edit.htm", + 'fields' => array ( + 'server_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT server_id,server_name FROM server WHERE mail_server = 1 AND mirror_server_id = 0 AND {AUTHSQL} ORDER BY server_name', + 'keyfield'=> 'server_id', + 'valuefield'=> 'server_name' + ), + 'value' => '' + ), + 'mailinglist_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT mailinglist_id, CONCAT_WS(\'@\', listname, domain) as listname FROM mail_mailinglist WHERE {AUTHSQL} ORDER BY listname', + 'keyfield'=> 'mailinglist_id', + 'valuefield'=> 'listname' + ), + 'value' => '' + ), + 'email' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'IDNTOASCII'), + 1 => array( 'event' => 'SHOW', + 'type' => 'IDNTOUTF8'), + 2 => array( 'event' => 'SAVE', + 'type' => 'TOLOWER') + ), + 'validators' => array ( 0 => array ( 'type' => 'ISEMAIL', + 'errmsg'=> 'email_error_isemail'), + 1 => array ( 'type' => 'UNIQUE', + 'errmsg'=> 'email_error_unique'), + ), + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255', + 'searchable' => 1 + ), + 'name' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255', + 'searchable' => 2 + ), + 'welcome_msg' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'y', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'goodbye_msg' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + ), +); \ No newline at end of file diff --git a/interface/web/mail/lib/lang/en_imail_ml_membership_list.lng b/interface/web/mail/lib/lang/en_imail_ml_membership_list.lng new file mode 100644 index 0000000000..4c2c4671f5 --- /dev/null +++ b/interface/web/mail/lib/lang/en_imail_ml_membership_list.lng @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/interface/web/mail/lib/lang/en_mail_ml_membership.lng b/interface/web/mail/lib/lang/en_mail_ml_membership.lng new file mode 100755 index 0000000000..1c39d8452b --- /dev/null +++ b/interface/web/mail/lib/lang/en_mail_ml_membership.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/mail/lib/lang/it_mail_ml_membership.lng b/interface/web/mail/lib/lang/it_mail_ml_membership.lng new file mode 100755 index 0000000000..b44d8a19ff --- /dev/null +++ b/interface/web/mail/lib/lang/it_mail_ml_membership.lng @@ -0,0 +1,8 @@ +auth->get_client_limit($userid, 'mailmailinglist') != 0) 'target' => 'content', 'link' => 'mail/mail_mailinglist_list.php', 'html_id' => 'mail_mailinglist_list'); + + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; + if($mlManager == 'mlmmj') + $items[] = array( 'title' => 'Membership', + 'target' => 'content', + 'link' => 'mail/mail_ml_membership_list.php', + 'html_id' => 'mail_ml_membership_list'); } if(count($items) && $app->system->has_service($userid, 'mail')) diff --git a/interface/web/mail/list/mail_ml_membership.list.php b/interface/web/mail/list/mail_ml_membership.list.php new file mode 100644 index 0000000000..d23211817c --- /dev/null +++ b/interface/web/mail/list/mail_ml_membership.list.php @@ -0,0 +1,93 @@ + "mailinglist_id", + 'datatype' => "INTEGER", + 'formtype' => "SELECT", + 'op' => "like", + 'prefix' => "", + 'suffix' => "", + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT mailinglist_id, CONCAT_WS(\'@\', listname, domain) as listname FROM mail_mailinglist WHERE {AUTHSQL} ORDER BY listname', + 'keyfield'=> 'mailinglist_id', + 'valuefield'=> 'listname' + ), + 'width' => "", + 'value' => ""); + + +$liste["item"][] = array( 'field' => "email", + 'datatype' => "VARCHAR", + 'filters' => array( 0 => array( 'event' => 'SHOW', + 'type' => 'IDNTOUTF8') + ), + 'formtype' => "TEXT", + 'op' => "like", + 'prefix' => "%", + 'suffix' => "%", + 'width' => "", + 'value' => ""); + +$liste["item"][] = array( 'field' => "name", + 'datatype' => "VARCHAR", + 'formtype' => "TEXT", + 'op' => "like", + 'prefix' => "%", + 'suffix' => "%", + 'width' => "", + 'value' => ""); + +$liste["item"][] = array( 'field' => "goodbye_msg", + 'datatype' => "VARCHAR", + 'formtype' => "SELECT", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", + 'width' => "", + 'value' => array('n' => "
".$app->lng('no_txt')."
", 'y' => "
".$app->lng('yes_txt')."
")); diff --git a/interface/web/mail/mail_ml_membership_del.php b/interface/web/mail/mail_ml_membership_del.php new file mode 100644 index 0000000000..d2dcaf542b --- /dev/null +++ b/interface/web/mail/mail_ml_membership_del.php @@ -0,0 +1,63 @@ +auth->check_module_permissions('mail'); + +// Loading classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + + function onBeforeDelete() { + global $app; $conf; + + } +} + +$page = new page_action; +$page->onDelete(); + +?> diff --git a/interface/web/mail/mail_ml_membership_edit.php b/interface/web/mail/mail_ml_membership_edit.php new file mode 100755 index 0000000000..f60e519c3c --- /dev/null +++ b/interface/web/mail/mail_ml_membership_edit.php @@ -0,0 +1,105 @@ +auth->check_module_permissions('mail'); + +// Loading classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + + + function onShowNew() { + global $app, $conf; + + //TODO: Add ml members limit + // we will check only users, not admins +// if($_SESSION["s"]["user"]["typ"] == 'user') { +// if(!$app->tform->checkClientLimit('limit_ml_membership')) { +// $app->error($app->tform->wordbook["limit_ml_membership_txt"]); +// } +// if(!$app->tform->checkResellerLimit('limit_ml_membership')) { +// $app->error('Reseller: '.$app->tform->wordbook["limit_ml_membership_txt"]); +// } +// } + + parent::onShowNew(); + } + + function onShowEnd() { + global $app, $conf; + + if($this->id > 0) { + //* we are editing a existing record + $app->tpl->setVar("edit_disabled", 1); + + + $sql = "SELECT mailinglist_id, email FROM mail_ml_membership WHERE subscriber_id = ?"; + $mlID = $app->db->queryOneRecord($sql, $this->id); + if($mlID['mailinglist_id']) $app->tpl->setVar("mailinglist_id_value", $mlID["mailinglist_id"]); + if($mlID['email']) $app->tpl->setVar("email_value", $mlID["email"]); + } else { + $app->tpl->setVar("edit_disabled", 0); + } + + parent::onShowEnd(); + } + + function onBeforeInsert() { + global $app, $conf; + + // Set the server id of the mailinglist members = server ID of mail domain. + $domain = $app->db->queryOneRecord("SELECT server_id FROM mail_mailinglist WHERE mailinglist_id = ?", $this->dataRecord["mailinglist_id"]); + + file_put_contents('/tmp/vaso', "SELECT server_id FROM mail_mailinglist WHERE mailinglist_id = ". $this->dataRecord["mailinglist_id"]); + $this->dataRecord["server_id"] = $domain['server_id']; + } + +} + +$app->tform_actions = new page_action; +$app->tform_actions->onLoad(); + +?> diff --git a/interface/web/mail/mail_ml_membership_list.php b/interface/web/mail/mail_ml_membership_list.php new file mode 100644 index 0000000000..7d5be8a599 --- /dev/null +++ b/interface/web/mail/mail_ml_membership_list.php @@ -0,0 +1,40 @@ +auth->check_module_permissions('mail'); + +$app->load('listform_actions'); + +class list_action extends listform_actions { + + function onShow() { + global $app, $conf; + + $app->uses('getconf'); + $global_config = $app->getconf->get_global_config('mail'); + + if($global_config['mailmailinglist_link'] == 'y') { + $app->tpl->setVar('mailmailinglist_link', 1); + } else { + $app->tpl->setVar('mailmailinglist_link', 0); + } + + parent::onShow(); + } + +} + +$list = new list_action; +$list->onLoad(); \ No newline at end of file diff --git a/interface/web/mail/templates/mail_mailinglist_edit.htm b/interface/web/mail/templates/mail_mailinglist_edit.htm index 1167e1b56f..8b35adda7f 100644 --- a/interface/web/mail/templates/mail_mailinglist_edit.htm +++ b/interface/web/mail/templates/mail_mailinglist_edit.htm @@ -4,89 +4,98 @@

- Mailing List - -
- -
-
-
+ +
+ +
+
+
- -
- -
-
-
+ +
+ +
+
+
- -
- -
- -
+ -
- -
-
-
- -
-
- -
- -
-
-
- -
-
- -
-
- -
- -
-
- - - - -
-
-
-
- -
-
-   -
-
-
- -
-
-
- - +
+ +
+
+ + @ +
+ +
+
+ +
+
+ +
+ +
+
+ + + +
+ +
+
+ + @ +
+
- +
+
+
+ +
+ + + +
+ +
+
+ + + + +
+
+
+
+ +
+
+   +
+
+
+ +
+
+
+
+ + +
+
+
- + -
- - -
+
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_ml_membership_edit.htm b/interface/web/mail/templates/mail_ml_membership_edit.htm new file mode 100644 index 0000000000..bc45027eda --- /dev/null +++ b/interface/web/mail/templates/mail_ml_membership_edit.htm @@ -0,0 +1,64 @@ + +

+ + +
+ +
+ +
+
+ +
+ +
+
  {tmpl_var name='name_optional_txt'}
+
+
+ +
+ +
+
+
+ +
+ {tmpl_var name='goodbye_msg'} +
+
+ +
+ +
+
+
+ +
+ +
+
  {tmpl_var name='name_optional_txt'}
+
+
+ +
+ +
+
+
+ +
+ {tmpl_var name='welcome_msg'} +
+
+
+ + + +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_ml_membership_list.htm b/interface/web/mail/templates/mail_ml_membership_list.htm new file mode 100644 index 0000000000..9142179bc5 --- /dev/null +++ b/interface/web/mail/templates/mail_ml_membership_list.htm @@ -0,0 +1,75 @@ + +

+ + + +
+
+
+
+ {tmpl_var name="datalog_changes_txt"} +
    + +
  • {tmpl_var name="text"}: {tmpl_var name="count"}
  • +
    +
+ {tmpl_var name="datalog_changes_end_txt"} +
+

+
+
+

{tmpl_var name="toolsarea_head_txt"}

+ + + + + + +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{tmpl_var name='search_limit'}
  + +
{tmpl_var name="mailinglist_id"}{tmpl_var name="email"}{tmpl_var name="name"}{tmpl_var name="goodbye_msg"} + +
{tmpl_var name='globalsearch_noresults_text_txt'}
+
diff --git a/server/mods-available/mail_module.inc.php b/server/mods-available/mail_module.inc.php index bc6d290145..8460d5d96a 100644 --- a/server/mods-available/mail_module.inc.php +++ b/server/mods-available/mail_module.inc.php @@ -55,7 +55,10 @@ class mail_module { 'mail_content_filter_delete', 'mail_mailinglist_insert', 'mail_mailinglist_update', - 'mail_mailinglist_delete'); + 'mail_mailinglist_delete', + 'mail_ml_member_insert', + 'mail_ml_member_update', + 'mail_ml_member_delete'); //* This function is called during ispconfig installation to determine // if a symlink shall be created for this plugin. @@ -102,6 +105,7 @@ class mail_module { $app->modules->registerTableHook('mail_get', 'mail_module', 'process'); $app->modules->registerTableHook('mail_content_filter', 'mail_module', 'process'); $app->modules->registerTableHook('mail_mailinglist', 'mail_module', 'process'); + $app->modules->registerTableHook('mail_ml_membership', 'mail_module', 'process'); } @@ -154,6 +158,11 @@ class mail_module { if($action == 'u') $app->plugins->raiseEvent('mail_mailinglist_update', $data); if($action == 'd') $app->plugins->raiseEvent('mail_mailinglist_delete', $data); break; + case 'mail_ml_membership': + if($action == 'i') $app->plugins->raiseEvent('mail_ml_member_insert', $data); + if($action == 'u') $app->plugins->raiseEvent('mail_ml_member_update', $data); + if($action == 'd') $app->plugins->raiseEvent('mail_ml_member_delete', $data); + break; } // end switch } // end function diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php index 15c434c831..1dfa6a9132 100644 --- a/server/plugins-available/mlmmj_plugin.inc.php +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -68,12 +68,17 @@ class mlmmj_plugin { global $app; // Register for the events - $app->plugins->registerEvent('mail_mailinglist_insert', 'mlmmj_plugin', 'insert'); - $app->plugins->registerEvent('mail_mailinglist_update', 'mlmmj_plugin', 'update'); - $app->plugins->registerEvent('mail_mailinglist_delete', 'mlmmj_plugin', 'delete'); + $app->plugins->registerEvent('mail_mailinglist_insert', $this->plugin_name, 'list_insert'); + $app->plugins->registerEvent('mail_mailinglist_update', $this->plugin_name, 'list_update'); + $app->plugins->registerEvent('mail_mailinglist_delete', $this->plugin_name, 'list_delete'); + + $app->plugins->registerEvent('mail_ml_member_insert', $this->plugin_name, 'member_insert'); + $app->plugins->registerEvent('mail_ml_member_update', $this->plugin_name, 'member_update'); + $app->plugins->registerEvent('mail_ml_member_delete', $this->plugin_name, 'member_delete'); + } - function insert($event_name, $data) { + function list_insert($event_name, $data) { global $app, $conf; $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; @@ -133,7 +138,7 @@ class mlmmj_plugin { } // The purpose of this plugin is to rewrite the main.cf file - function update($event_name, $data) { + function list_update($event_name, $data) { global $app, $conf; $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; @@ -219,7 +224,7 @@ class mlmmj_plugin { } } - function delete($event_name, $data) { + function list_delete($event_name, $data) { global $app, $conf; $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; @@ -246,6 +251,61 @@ class mlmmj_plugin { } } + function member_insert($event_name, $data) { + global $app, $conf; + + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; + + if($mlManager == 'mlmmj') { + $mlConf = $this->getMlConfig(); + + $rec = $data['new']; + + $sql = "SELECT * FROM mail_mailinglist WHERE mailinglist_id = ?"; + $ml = $app->db->queryOneRecord($sql, $rec['mailinglist_id']); + if($ml['mailinglist_id']) { + $listDomain = $ml['domain']; + $listName = $ml['listname']; + $listDir = $mlConf['spool_dir']."/$listDomain/$listName"; + } + + $welcome = ($rec['welcome_msg'] == 'y')?'-c':''; + $command = "/usr/bin/mlmmj-sub -q -s -L $listDir $welcome -a ".$rec['email']; + exec("nohup $command>/dev/null 2>&1"); + } +// file_put_contents('/tmp/figa',"$command\n"); +// file_put_contents('/tmp/figa',print_r($rec, true), FILE_APPEND); +// file_put_contents('/tmp/figa',"/usr/bin/mlmmj-sub -L $listDir -a ".$rec['email'], FILE_APPEND); + } + + function member_update($event_name, $data) { + //TODO: Implement something usefull on update event (e.g. change to digest subscription) + } + + function member_delete($event_name, $data) { + global $app, $conf; + + $mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager']; + + if($mlManager == 'mlmmj') { + $mlConf = $this->getMlConfig(); + + $rec = $data['old']; + + $sql = "SELECT * FROM mail_mailinglist WHERE mailinglist_id = ?"; + $ml = $app->db->queryOneRecord($sql, $rec['mailinglist_id']); + if($ml['mailinglist_id']) { + $listDomain = $ml['domain']; + $listName = $ml['listname']; + $listDir = $mlConf['spool_dir']."/$listDomain/$listName"; + } + + $goodbye = ($rec['goodbye_msg'] == 'y')?'-c':''; + $command = "/usr/bin/mlmmj-unsub -q -s -L $listDir $goodbye -a ".$rec['email']; + exec("nohup $command>/dev/null 2>&1"); + } + } + private function getMlConfig() { $mlConfig = @parse_ini_file($this->mlmmj_config_dir.'mlmmj.conf'); @@ -346,4 +406,4 @@ class mlmmj_plugin { } } // end class -?> \ No newline at end of file +?> -- GitLab From 34f11f46145c293a32d366f1a4aae3f3fd0ad6cd Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 11 Oct 2016 01:13:24 +0200 Subject: [PATCH 052/302] Removed debug useless messages --- interface/web/mail/mail_ml_membership_edit.php | 1 - server/plugins-available/mlmmj_plugin.inc.php | 3 --- 2 files changed, 4 deletions(-) diff --git a/interface/web/mail/mail_ml_membership_edit.php b/interface/web/mail/mail_ml_membership_edit.php index f60e519c3c..60f0f1b21b 100755 --- a/interface/web/mail/mail_ml_membership_edit.php +++ b/interface/web/mail/mail_ml_membership_edit.php @@ -93,7 +93,6 @@ class page_action extends tform_actions { // Set the server id of the mailinglist members = server ID of mail domain. $domain = $app->db->queryOneRecord("SELECT server_id FROM mail_mailinglist WHERE mailinglist_id = ?", $this->dataRecord["mailinglist_id"]); - file_put_contents('/tmp/vaso', "SELECT server_id FROM mail_mailinglist WHERE mailinglist_id = ". $this->dataRecord["mailinglist_id"]); $this->dataRecord["server_id"] = $domain['server_id']; } diff --git a/server/plugins-available/mlmmj_plugin.inc.php b/server/plugins-available/mlmmj_plugin.inc.php index 1dfa6a9132..7f1130e01c 100644 --- a/server/plugins-available/mlmmj_plugin.inc.php +++ b/server/plugins-available/mlmmj_plugin.inc.php @@ -273,9 +273,6 @@ class mlmmj_plugin { $command = "/usr/bin/mlmmj-sub -q -s -L $listDir $welcome -a ".$rec['email']; exec("nohup $command>/dev/null 2>&1"); } -// file_put_contents('/tmp/figa',"$command\n"); -// file_put_contents('/tmp/figa',print_r($rec, true), FILE_APPEND); -// file_put_contents('/tmp/figa',"/usr/bin/mlmmj-sub -L $listDir -a ".$rec['email'], FILE_APPEND); } function member_update($event_name, $data) { -- GitLab From b666515e2495981127534de5b802bb5e7b19684d Mon Sep 17 00:00:00 2001 From: Denny Bortfeldt Date: Tue, 11 Oct 2016 11:59:41 +0200 Subject: [PATCH 053/302] Update language_edit.htm: add col-sm-3 to label-tag so that the language key is on the left side instead of the right side with all other keys. --- interface/web/admin/templates/language_edit.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/templates/language_edit.htm b/interface/web/admin/templates/language_edit.htm index d3830494da..1a1625b4bb 100644 --- a/interface/web/admin/templates/language_edit.htm +++ b/interface/web/admin/templates/language_edit.htm @@ -8,7 +8,7 @@ - +
-- GitLab From dd975430075f56238a8ef42f7cf0651aedb839ad Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Sun, 23 Oct 2016 13:36:43 +0200 Subject: [PATCH 054/302] - simplified check for apache binary --- .../plugins-available/apache2_plugin.inc.php | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 536297d215..ef919c7b79 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1906,33 +1906,9 @@ class apache2_plugin { } else { // if no output is given, check again $webserver_binary = ''; - exec('which apache2ctl', $webserver_check_output, $webserver_check_retval); + exec('which apache2ctl apache2 httpd2 httpd apache 2>/dev/null', $webserver_check_output, $webserver_check_retval); if($webserver_check_retval == 0){ - $webserver_binary = 'apache2ctl'; - } else { - unset($webserver_check_output, $webserver_check_retval); - exec('which apache2', $webserver_check_output, $webserver_check_retval); - if($webserver_check_retval == 0){ - $webserver_binary = 'apache2'; - } else { - unset($webserver_check_output, $webserver_check_retval); - exec('which httpd2', $webserver_check_output, $webserver_check_retval); - if($webserver_check_retval == 0){ - $webserver_binary = 'httpd2'; - } else { - unset($webserver_check_output, $webserver_check_retval); - exec('which httpd', $webserver_check_output, $webserver_check_retval); - if($webserver_check_retval == 0){ - $webserver_binary = 'httpd'; - } else { - unset($webserver_check_output, $webserver_check_retval); - exec('which apache', $webserver_check_output, $webserver_check_retval); - if($webserver_check_retval == 0){ - $webserver_binary = 'apache'; - } - } - } - } + $webserver_binary = reset($webserver_check_output); } if($webserver_binary != ''){ exec($webserver_binary.' -t 2>&1', $tmp_output, $tmp_retval); -- GitLab From 736f9efba2d893774e937c35f19d9752b214352f Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Fri, 28 Oct 2016 17:37:24 +0200 Subject: [PATCH 055/302] - create missing bundle file for apache (thanks to MR !479 by @Niklas) --- server/plugins-available/apache2_plugin.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 9bb2d314f4..dfc7c46ced 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -272,6 +272,7 @@ class apache2_plugin { $key_file2 = $ssl_dir.'/'.$domain.'.key.org'; $csr_file = $ssl_dir.'/'.$domain.'.csr'; $crt_file = $ssl_dir.'/'.$domain.'.crt'; + $bundle_file = $ssl_dir.'/'.$domain.'.bundle'; //* Create a SSL Certificate, but only if this is not a mirror server. if($data['new']['ssl_action'] == 'create' && $conf['mirror_server_id'] == 0) { @@ -416,7 +417,10 @@ class apache2_plugin { if(version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) { $tmp_data = ''; if(trim($data["new"]["ssl_cert"]) != '') $tmp_data .= $data["new"]["ssl_cert"] . "\n"; - if(trim($data["new"]["ssl_bundle"]) != '') $tmp_data .= $data["new"]["ssl_bundle"]; + if(trim($data["new"]["ssl_bundle"]) != '') { + $tmp_data .= $data["new"]["ssl_bundle"]; + $app->system->file_put_contents($bundle_file, $data["new"]["ssl_bundle"]); + } if(trim($tmp_data) != '') $app->system->file_put_contents($crt_file, $tmp_data); } else { if(trim($data["new"]["ssl_cert"]) != '') $app->system->file_put_contents($crt_file, $data["new"]["ssl_cert"]); -- GitLab From 686733ce1224c3f70870d2da6de308c21a51eea7 Mon Sep 17 00:00:00 2001 From: enavn Date: Wed, 16 Nov 2016 12:10:13 +0100 Subject: [PATCH 056/302] Only load "ISPConfig.loadInitContent();" here to fix #4309 --- interface/web/themes/default/templates/main.tpl.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 3b58c049f5..0dde5f8014 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -141,7 +141,7 @@ searchFieldWatermark: '', resultBoxPosition: '' }); - + ISPConfig.loadInitContent(); }); //--> -- GitLab From d5dfd5cb4bd157c26a15e00e9a903d463d3f3b52 Mon Sep 17 00:00:00 2001 From: enavn Date: Wed, 16 Nov 2016 12:12:31 +0100 Subject: [PATCH 057/302] Don't load "ISPConfig.loadInitContent();" here to fix #4309 --- interface/web/themes/default/assets/javascripts/ispconfig.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index fcd5167a88..881dfb2c10 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -768,8 +768,6 @@ $(document).on('ready', function () { $('.progress .progress-bar').css('width', function () { return $(this).attr('aria-valuenow') + '%'; }); - - ISPConfig.loadInitContent(); $('#searchform').submit(function(e) { e.preventDefault(); -- GitLab From 9155364d7fad9a8027497d218eb8dde9bb75a68b Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Wed, 16 Nov 2016 14:05:23 +0100 Subject: [PATCH 058/302] fix XMPP severs selection --- interface/lib/classes/custom_datasource.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/lib/classes/custom_datasource.inc.php b/interface/lib/classes/custom_datasource.inc.php index d972fbd251..0f6d2c2996 100644 --- a/interface/lib/classes/custom_datasource.inc.php +++ b/interface/lib/classes/custom_datasource.inc.php @@ -136,6 +136,9 @@ class custom_datasource { case 'default_dbserver': $field = 'db_server'; break; + case 'default_xmppserver': + $field = 'xmpp_server'; + break; case 'default_vserverserver': $field = 'vserver_server'; break; @@ -151,6 +154,9 @@ class custom_datasource { case 'db_servers': $field = 'db_server'; break; + case 'xmpp_servers': + $field = 'xmpp_server'; + break; default: $field = 'web_server'; break; -- GitLab From f59865b3a277d37d1c4df746fbeae333a65c5d07 Mon Sep 17 00:00:00 2001 From: Mina Gerges Date: Wed, 16 Nov 2016 18:03:32 +0100 Subject: [PATCH 059/302] Update monitor_tools.inc.php (Centos distver) --- server/lib/classes/monitor_tools.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index a9c805ced5..61f20e068b 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -265,23 +265,23 @@ class monitor_tools { $distbaseid = 'fedora'; } elseif(stristr($content, 'CentOS release 5')) { $distname = 'CentOS'; - $distver = 'Unknown'; + $distver = '5'; $distid = 'centos53'; $distbaseid = 'fedora'; } elseif(stristr($content, 'CentOS Linux release 6')) { $distname = 'CentOS'; - $distver = 'Unknown'; + $distver = '6'; $distid = 'centos53'; $distbaseid = 'fedora'; } elseif(stristr($content, 'CentOS Linux release 7.2')) { $distname = 'CentOS'; - $distver = 'Unknown'; + $distver = '7.2'; $distid = 'centos70'; $distconfid = 'centos72'; $distbaseid = 'fedora'; } elseif(stristr($content, 'CentOS Linux release 7')) { $distname = 'CentOS'; - $distver = 'Unknown'; + $distver = '7'; $distid = 'centos70'; $distbaseid = 'fedora'; } else { -- GitLab From 2d6162fed86782dcd7dab8f8991e0a931b184825 Mon Sep 17 00:00:00 2001 From: Mina Gerges Date: Wed, 16 Nov 2016 18:08:30 +0100 Subject: [PATCH 060/302] Added support for CentOS / RHEL --- .../classes/cron.d/100-monitor_system_update.inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/lib/classes/cron.d/100-monitor_system_update.inc.php b/server/lib/classes/cron.d/100-monitor_system_update.inc.php index bc4f521073..c610a84943 100644 --- a/server/lib/classes/cron.d/100-monitor_system_update.inc.php +++ b/server/lib/classes/cron.d/100-monitor_system_update.inc.php @@ -159,6 +159,18 @@ class cronjob_monitor_system_update extends cronjob { * Fetch the output */ $data['output'] = shell_exec('zypper lu'); + } else if (file_exists('/etc/redhat-release')) { + + if(shell_exec("yum list updates | awk 'p; /Updated Packages/ {p=1}'") == '') { + // There is nothing to update + $state = 'ok'; + } + else { + $state = 'info'; + } + // Fetch the output + $yumData = shell_exec('yum check-update'); + $data['output'] = $yumData; } else { /* * It is not Debian/Ubuntu, so there is no data and no state -- GitLab From 40a36bf4d4e661a78d70cece8a01211a7c300602 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Sat, 19 Nov 2016 11:07:05 +0100 Subject: [PATCH 061/302] fix ipv6 auth compatibility for `attempts_login` table and `auth.log` file --- interface/web/login/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 75a013b811..51a7a66bd9 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -63,7 +63,7 @@ if(count($_POST) > 0) { if(!preg_match("/^.{1,256}$/i", $_POST['password'])) $error = $app->lng('pw_error_length'); //** importing variables - $ip = ip2long($_SERVER['REMOTE_ADDR']); + $ip = md5($_SERVER['REMOTE_ADDR']); $username = $_POST['username']; $password = $_POST['password']; $loginAs = false; @@ -262,7 +262,7 @@ if(count($_POST) > 0) { $app->plugin->raiseEvent('login', $this); //* Save successfull login message to var - $authlog = 'Successful login for user \''. $username .'\' from '. long2ip($ip) .' at '. date('Y-m-d H:i:s'); + $authlog = 'Successful login for user \''. $username .'\' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s'); $authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a'); fwrite($authlog_handle, $authlog ."\n"); fclose($authlog_handle); @@ -300,7 +300,7 @@ if(count($_POST) > 0) { $app->plugin->raiseEvent('login_failed', $this); //* Save failed login message to var - $authlog = 'Failed login for user \''. $username .'\' from '. long2ip($ip) .' at '. date('Y-m-d H:i:s'); + $authlog = 'Failed login for user \''. $username .'\' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s'); $authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a'); fwrite($authlog_handle, $authlog ."\n"); fclose($authlog_handle); -- GitLab From 77eb71fca0550857e00740ff69cd8e1a08133094 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Sun, 20 Nov 2016 18:33:58 +0100 Subject: [PATCH 062/302] fix XMPP correct nameserver server_id --- interface/web/mail/xmpp_domain_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/xmpp_domain_edit.php b/interface/web/mail/xmpp_domain_edit.php index 3f62dbdb03..aaa8d640e8 100644 --- a/interface/web/mail/xmpp_domain_edit.php +++ b/interface/web/mail/xmpp_domain_edit.php @@ -402,7 +402,7 @@ class page_action extends tform_actions { // $this->desyncMailusers($this->dataRecord['domain']); // Update DNS Records // TODO: Update gets only triggered from main form. WHY? - $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other FROM dns_soa WHERE active = 'Y' AND `origin` = ?", $this->dataRecord['domain'].'.'); + $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id FROM dns_soa WHERE active = 'Y' AND `origin` = ?", $this->dataRecord['domain'].'.'); if ( isset($soa) && !empty($soa) ) $this->update_dns($this->dataRecord, $soa); } -- GitLab From a36e5b78f556527490ffe4ffcc71b7781bd0b4e9 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Tue, 22 Nov 2016 20:37:47 +0100 Subject: [PATCH 063/302] fix XMPP correct Jabber ID field --- interface/web/mail/list/xmpp_user.list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/list/xmpp_user.list.php b/interface/web/mail/list/xmpp_user.list.php index c1cdbb8d4d..075e7c4554 100644 --- a/interface/web/mail/list/xmpp_user.list.php +++ b/interface/web/mail/list/xmpp_user.list.php @@ -47,7 +47,7 @@ $liste["auth"] = "yes"; * Suchfelder *****************************************************/ -$liste["item"][] = array( 'field' => "JID", +$liste["item"][] = array( 'field' => "jid", 'datatype' => "VARCHAR", 'filters' => array( 0 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8') -- GitLab From 0b73ad567fb4c31f3a9d60e430bdb67e2d45fd12 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Wed, 23 Nov 2016 16:19:00 +0100 Subject: [PATCH 064/302] fix Let's Encrypt add web domain alias support --- server/plugins-available/apache2_plugin.inc.php | 1 + server/plugins-available/nginx_plugin.inc.php | 1 + 2 files changed, 2 insertions(+) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index dfc7c46ced..a232debf82 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1183,6 +1183,7 @@ class apache2_plugin { ($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration || ($data['old']['domain'] != $data['new']['domain']) // we have domain update || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain + || ($data['old']['type'] == 'alias' || $data['new']['type'] == 'alias') // we have new or update on alias domain || $this->update_letsencrypt == true )) { // default values diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 748a61f98c..73dac33b07 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1251,6 +1251,7 @@ class nginx_plugin { ($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration || ($data['old']['domain'] != $data['new']['domain']) // we have domain update || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain + || ($data['old']['type'] == 'alias' || $data['new']['type'] == 'alias') // we have new or update on alias domain || $this->update_letsencrypt == true )) { // default values -- GitLab From 8ced51c7052b28f28d9d80c2358e6d8be993d501 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Thu, 24 Nov 2016 19:57:37 +0100 Subject: [PATCH 065/302] Revert "fix Let's Encrypt add web domain alias support" This reverts commit 0b73ad567fb4c31f3a9d60e430bdb67e2d45fd12. --- server/plugins-available/apache2_plugin.inc.php | 1 - server/plugins-available/nginx_plugin.inc.php | 1 - 2 files changed, 2 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index a232debf82..dfc7c46ced 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1183,7 +1183,6 @@ class apache2_plugin { ($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration || ($data['old']['domain'] != $data['new']['domain']) // we have domain update || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain - || ($data['old']['type'] == 'alias' || $data['new']['type'] == 'alias') // we have new or update on alias domain || $this->update_letsencrypt == true )) { // default values diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 73dac33b07..748a61f98c 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1251,7 +1251,6 @@ class nginx_plugin { ($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration || ($data['old']['domain'] != $data['new']['domain']) // we have domain update || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain - || ($data['old']['type'] == 'alias' || $data['new']['type'] == 'alias') // we have new or update on alias domain || $this->update_letsencrypt == true )) { // default values -- GitLab From 78661560c11be1ed2888c1c9ceb55c5e4cc3d73a Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Sun, 4 Dec 2016 15:06:05 +0100 Subject: [PATCH 066/302] fix XMPP anonymous --- server/conf/metronome_conf_host.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/conf/metronome_conf_host.master b/server/conf/metronome_conf_host.master index 179d533e19..3dea69257b 100644 --- a/server/conf/metronome_conf_host.master +++ b/server/conf/metronome_conf_host.master @@ -59,7 +59,7 @@ VirtualHost "{tmpl_var name='domain'}" }; - + VirtualHost "anon.{tmpl_var name='domain'}" enabled = true; authentication = "anonymous"; -- GitLab From 3e091da9db49fb46926320ff04e72e9e0e1e3164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristia=CC=81n=20Feldsam?= Date: Sun, 11 Dec 2016 13:43:56 +0100 Subject: [PATCH 067/302] Letsencrypt enhanced generation and logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kristián Feldsam --- .../plugins-available/apache2_plugin.inc.php | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index dfc7c46ced..747f925c64 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1243,18 +1243,24 @@ class apache2_plugin { $success = false; $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); $letsencrypt = reset($letsencrypt); + $letsencrypt_cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"; if(is_executable($letsencrypt)) { - $success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); + $success = $this->_exec($letsencrypt_cmd); } if(!$success) { // error issuing cert $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN); - $data['new']['ssl_letsencrypt'] = 'n'; - if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; - /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); - /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); + $app->log($letsencrypt_cmd, LOGLEVEL_WARN); + + // if cert already exists, dont remove it. Ex. expired/misstyped/noDnsYet alias domain, api down... + if(!file_exists($crt_tmp_file)) { + $data['new']['ssl_letsencrypt'] = 'n'; + if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; + /* Update the DB of the (local) Server */ + $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); + /* Update also the master-DB of the Server-Farm */ + $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); + } } //} @@ -3355,8 +3361,12 @@ class apache2_plugin { $ret = 0; $app->log('exec: '.$command, LOGLEVEL_DEBUG); exec($command, $out, $ret); - if($ret != 0) return false; - else return true; + if($ret != 0) { + $app->log(implode("\n", $out), LOGLEVEL_WARN); + return false; + } else { + return true; + } } private function _checkTcp ($host, $port) { -- GitLab From 1e3227c0ecd1403cd6443a18e25aaa1c34ab16fc Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Thu, 15 Dec 2016 17:02:17 +0100 Subject: [PATCH 068/302] XMPP remote API permissions XMPP remote API endpoint --- interface/lib/classes/remote.d/mail.inc.php | 180 ++++++++++++++++++++ interface/web/mail/lib/remote.conf.php | 5 +- 2 files changed, 183 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index bda7e861ed..e3a66e9eed 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -1107,4 +1107,184 @@ class remoting_mail extends remoting { } + //** xmpp functions ----------------------------------------------------------------------------------- + + public function xmpp_domain_get($session_id, $primary_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'xmpp_domain_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $app->uses('remoting_lib'); + $app->remoting_lib->loadFormDef('../mail/form/xmpp_domain.tform.php'); + return $app->remoting_lib->getDataRecord($primary_id); + } + + public function xmpp_domain_add($session_id, $client_id, $params) + { + if(!$this->checkPerm($session_id, 'xmpp_domain_add')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $primary_id = $this->insertQuery('../mail/form/xmpp_domain.tform.php', $client_id, $params); + return $primary_id; + } + + public function xmpp_domain_update($session_id, $client_id, $primary_id, $params) + { + if(!$this->checkPerm($session_id, 'xmpp_domain_update')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/xmpp_domain.tform.php', $client_id, $primary_id, $params); + return $affected_rows; + } + + public function xmpp_domain_delete($session_id, $primary_id) + { + if(!$this->checkPerm($session_id, 'xmpp_domain_delete')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/xmpp_domain.tform.php', $primary_id); + return $affected_rows; + } + + public function xmpp_user_get($session_id, $primary_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'xmpp_user_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $app->uses('remoting_lib'); + $app->remoting_lib->loadFormDef('../mail/form/xmpp_user.tform.php'); + return $app->remoting_lib->getDataRecord($primary_id); + } + + public function xmpp_user_add($session_id, $client_id, $params){ + global $app; + + if (!$this->checkPerm($session_id, 'xmpp_user_add')){ + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $jid_parts = explode('@', $params['jid']); + $tmp = $app->db->queryOneRecord("SELECT domain FROM xmpp_domain WHERE domain = ?", $jid_parts[1]); + if($tmp['domain'] != $jid_parts[1]) { + throw new SoapFault('xmpp_domain_does_not_exist', 'XMPP domain - '.$jid_parts[1].' - does not exist.'); + return false; + } + + $affected_rows = $this->insertQuery('../mail/form/xmpp_user.tform.php', $client_id, $params); + return $affected_rows; + } + + public function xmpp_user_update($session_id, $client_id, $primary_id, $params) + { + global $app; + + if (!$this->checkPerm($session_id, 'xmpp_user_update')) + { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $jid_parts = explode('@', $jid_parts['jid']); + $tmp = $app->db->queryOneRecord("SELECT domain FROM xmpp_domain WHERE domain = ?", $jid_parts[1]); + if($tmp['domain'] != $jid_parts[1]) { + throw new SoapFault('xmpp_domain_does_not_exist', 'Mail domain - '.$jid_parts[1].' - does not exist.'); + return false; + } + + $affected_rows = $this->updateQuery('../mail/form/xmpp_user.tform.php', $client_id, $primary_id, $params); + return $affected_rows; + } + + public function xmpp_user_delete($session_id, $primary_id) + { + if (!$this->checkPerm($session_id, 'xmpp_user_delete')) + { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/xmpp_user.tform.php', $primary_id); + return $affected_rows; + } + + public function xmpp_domain_get_by_domain($session_id, $domain) { + global $app; + if(!$this->checkPerm($session_id, 'xmpp_domain_get_by_domain')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + if (!empty($domain)) { + $sql = "SELECT * FROM xmpp_domain WHERE domain = ?"; + $result = $app->db->queryAllRecords($sql, $domain); + return $result; + } + return false; + } + + public function xmpp_domain_set_status($session_id, $primary_id, $status) { + global $app; + if(!$this->checkPerm($session_id, 'xmpp_domain_set_status')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + if(in_array($status, array('active', 'inactive'))) { + if ($status == 'active') { + $status = 'y'; + } else { + $status = 'n'; + } + $sql = "UPDATE xmpp_domain SET active = ? WHERE domain_id = ?"; + $app->db->query($sql, $status, $primary_id); + $result = $app->db->affectedRows(); + return $result; + } else { + throw new SoapFault('status_undefined', 'The status is not available'); + return false; + } + } + + public function xmpp_user_get_by_domain($session_id, $domain) { + global $app; + if(!$this->checkPerm($session_id, 'xmpp_user_get_by_domain')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + if (!empty($domain)) { + $sql = "SELECT * FROM xmpp_user WHERE domain = ?"; + $result = $app->db->queryAllRecords($sql, $domain); + return $result; + } + return false; + } + + public function xmpp_user_set_status($session_id, $primary_id, $status) { + global $app; + if(!$this->checkPerm($session_id, 'xmpp_user_set_status')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + if(in_array($status, array('active', 'inactive'))) { + if ($status == 'active') { + $status = 'y'; + } else { + $status = 'n'; + } + $sql = "UPDATE xmpp_user SET active = ? WHERE domain_id = ?"; + $app->db->query($sql, $status, $primary_id); + $result = $app->db->affectedRows(); + return $result; + } else { + throw new SoapFault('status_undefined', 'The status is not available'); + return false; + } + } ?> diff --git a/interface/web/mail/lib/remote.conf.php b/interface/web/mail/lib/remote.conf.php index ae03e9992a..491bfbc1b9 100644 --- a/interface/web/mail/lib/remote.conf.php +++ b/interface/web/mail/lib/remote.conf.php @@ -19,6 +19,7 @@ $function_list['mail_spamfilter_blacklist_get,mail_spamfilter_blacklist_add,mail $function_list['mail_user_filter_get,mail_user_filter_add,mail_user_filter_update,mail_user_filter_delete'] = 'Mail user filter functions'; $function_list['mail_user_backup'] = 'Mail Backup functions'; $function_list['mail_filter_get,mail_filter_add,mail_filter_update,mail_filter_delete'] = 'Mail filter functions'; +$function_list['xmpp_domain_get,xmpp_domain_add,xmpp_domain_update,xmpp_domain_delete,xmpp_domain_set_status,xmpp_domain_get_by_domain'] = 'XMPP domain functions'; +$function_list['xmpp_user_get,xmpp_user_add,xmpp_user_update,xmpp_user_delete,xmpp_user_set_status,xmpp_user_get_by_domain'] = 'XMPP user functions'; - -?> +?> \ No newline at end of file -- GitLab From 66e73fa50d3266d30f54b7630e9852187815339c Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Thu, 15 Dec 2016 20:22:30 +0100 Subject: [PATCH 069/302] fix typo --- interface/lib/classes/remote.d/mail.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index e3a66e9eed..76cce5ed66 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -1105,8 +1105,6 @@ class remoting_mail extends remoting { return $app->quota_lib->get_mailquota_data($client_id, false); } -} - //** xmpp functions ----------------------------------------------------------------------------------- public function xmpp_domain_get($session_id, $primary_id) @@ -1287,4 +1285,6 @@ class remoting_mail extends remoting { return false; } } + +} ?> -- GitLab From b06d2bb9c10bd71b965901f5873db1cab1857904 Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 15 Dec 2016 21:35:57 +0100 Subject: [PATCH 070/302] Implement Issue #4357 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shows last ip that was used to login successfully with this useraccount. Logins from admins using loginAs are ignored Implementiert Issue #4357 Zeigt die IP-Adresse des letzten erfolgreichen Logins auf dem Dashboard an. Verändert die gespeicherte IP-Adresse nicht, wenn man sich via "Einloggen als" angemeldet hat. Needed Database-Changes: ALTER TABLE `sys_user` ADD `last_login_ip` VARCHAR(50) NULL AFTER `lost_password_reqtime`; ALTER TABLE `sys_user` ADD `last_login_at` BIGINT(20) NULL AFTER `last_login_ip`; Tested/Working on Ubuntu 16.04 LTS --- interface/web/dashboard/lib/lang/ar.lng | 1 + interface/web/dashboard/lib/lang/bg.lng | 1 + interface/web/dashboard/lib/lang/br.lng | 1 + interface/web/dashboard/lib/lang/ca.lng | 1 + interface/web/dashboard/lib/lang/cz.lng | 2 +- interface/web/dashboard/lib/lang/de.lng | 1 + interface/web/dashboard/lib/lang/dk.lng | 1 + interface/web/dashboard/lib/lang/el.lng | 1 + interface/web/dashboard/lib/lang/en.lng | 1 + interface/web/dashboard/lib/lang/es.lng | 1 + interface/web/dashboard/lib/lang/fi.lng | 1 + interface/web/dashboard/lib/lang/fr.lng | 1 + interface/web/dashboard/lib/lang/hr.lng | 1 + interface/web/dashboard/lib/lang/hu.lng | 1 + interface/web/dashboard/lib/lang/id.lng | 1 + interface/web/dashboard/lib/lang/it.lng | 1 + interface/web/dashboard/lib/lang/ja.lng | 1 + interface/web/dashboard/lib/lang/nl.lng | 1 + interface/web/dashboard/lib/lang/pl.lng | 1 + interface/web/dashboard/lib/lang/pt.lng | 1 + interface/web/dashboard/lib/lang/ro.lng | 1 + interface/web/dashboard/lib/lang/ru.lng | 1 + interface/web/dashboard/lib/lang/se.lng | 1 + interface/web/dashboard/lib/lang/sk.lng | 1 + interface/web/dashboard/lib/lang/tr.lng | 1 + interface/web/dashboard/templates/dashboard.htm | 3 +++ interface/web/login/index.php | 13 ++++++++++--- 27 files changed, 38 insertions(+), 4 deletions(-) diff --git a/interface/web/dashboard/lib/lang/ar.lng b/interface/web/dashboard/lib/lang/ar.lng index 246054599f..ad0858d861 100644 --- a/interface/web/dashboard/lib/lang/ar.lng +++ b/interface/web/dashboard/lib/lang/ar.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/bg.lng b/interface/web/dashboard/lib/lang/bg.lng index 16a6b88be1..0e83d30835 100644 --- a/interface/web/dashboard/lib/lang/bg.lng +++ b/interface/web/dashboard/lib/lang/bg.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/br.lng b/interface/web/dashboard/lib/lang/br.lng index 05935493bb..465b11f5b0 100644 --- a/interface/web/dashboard/lib/lang/br.lng +++ b/interface/web/dashboard/lib/lang/br.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/ca.lng b/interface/web/dashboard/lib/lang/ca.lng index a33b5e4efc..cb11661b0b 100644 --- a/interface/web/dashboard/lib/lang/ca.lng +++ b/interface/web/dashboard/lib/lang/ca.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/cz.lng b/interface/web/dashboard/lib/lang/cz.lng index 15063c03fa..16ed927c34 100644 --- a/interface/web/dashboard/lib/lang/cz.lng +++ b/interface/web/dashboard/lib/lang/cz.lng @@ -1,5 +1,5 @@ - diff --git a/interface/web/dashboard/lib/lang/de.lng b/interface/web/dashboard/lib/lang/de.lng index 45d6b1e174..ac6e8ff5a2 100644 --- a/interface/web/dashboard/lib/lang/de.lng +++ b/interface/web/dashboard/lib/lang/de.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/dk.lng b/interface/web/dashboard/lib/lang/dk.lng index 3701c791cc..fe4c09dfc9 100644 --- a/interface/web/dashboard/lib/lang/dk.lng +++ b/interface/web/dashboard/lib/lang/dk.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/el.lng b/interface/web/dashboard/lib/lang/el.lng index 134b9b52c5..76f5991a87 100644 --- a/interface/web/dashboard/lib/lang/el.lng +++ b/interface/web/dashboard/lib/lang/el.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/en.lng b/interface/web/dashboard/lib/lang/en.lng index 177fad0416..793a310e37 100644 --- a/interface/web/dashboard/lib/lang/en.lng +++ b/interface/web/dashboard/lib/lang/en.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/es.lng b/interface/web/dashboard/lib/lang/es.lng index 4338e475a7..18cbe02a84 100755 --- a/interface/web/dashboard/lib/lang/es.lng +++ b/interface/web/dashboard/lib/lang/es.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/fi.lng b/interface/web/dashboard/lib/lang/fi.lng index 246054599f..ad0858d861 100644 --- a/interface/web/dashboard/lib/lang/fi.lng +++ b/interface/web/dashboard/lib/lang/fi.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/fr.lng b/interface/web/dashboard/lib/lang/fr.lng index a33b5e4efc..cb11661b0b 100644 --- a/interface/web/dashboard/lib/lang/fr.lng +++ b/interface/web/dashboard/lib/lang/fr.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/hr.lng b/interface/web/dashboard/lib/lang/hr.lng index 769b77ae54..200f7698b7 100644 --- a/interface/web/dashboard/lib/lang/hr.lng +++ b/interface/web/dashboard/lib/lang/hr.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/hu.lng b/interface/web/dashboard/lib/lang/hu.lng index 18ffd803c1..cfbe028764 100644 --- a/interface/web/dashboard/lib/lang/hu.lng +++ b/interface/web/dashboard/lib/lang/hu.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/id.lng b/interface/web/dashboard/lib/lang/id.lng index 4d07360183..4b6dfd741d 100644 --- a/interface/web/dashboard/lib/lang/id.lng +++ b/interface/web/dashboard/lib/lang/id.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/it.lng b/interface/web/dashboard/lib/lang/it.lng index db8858aafd..f187dbbbbf 100644 --- a/interface/web/dashboard/lib/lang/it.lng +++ b/interface/web/dashboard/lib/lang/it.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/ja.lng b/interface/web/dashboard/lib/lang/ja.lng index 246054599f..ad0858d861 100644 --- a/interface/web/dashboard/lib/lang/ja.lng +++ b/interface/web/dashboard/lib/lang/ja.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/nl.lng b/interface/web/dashboard/lib/lang/nl.lng index aa92b9ce57..fde9bd05b8 100644 --- a/interface/web/dashboard/lib/lang/nl.lng +++ b/interface/web/dashboard/lib/lang/nl.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/pl.lng b/interface/web/dashboard/lib/lang/pl.lng index 5ef320a86e..31becb9847 100644 --- a/interface/web/dashboard/lib/lang/pl.lng +++ b/interface/web/dashboard/lib/lang/pl.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/pt.lng b/interface/web/dashboard/lib/lang/pt.lng index 246054599f..ad0858d861 100644 --- a/interface/web/dashboard/lib/lang/pt.lng +++ b/interface/web/dashboard/lib/lang/pt.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/ro.lng b/interface/web/dashboard/lib/lang/ro.lng index 246054599f..ad0858d861 100644 --- a/interface/web/dashboard/lib/lang/ro.lng +++ b/interface/web/dashboard/lib/lang/ro.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/ru.lng b/interface/web/dashboard/lib/lang/ru.lng index 2681fcfa45..67df1a241d 100644 --- a/interface/web/dashboard/lib/lang/ru.lng +++ b/interface/web/dashboard/lib/lang/ru.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/se.lng b/interface/web/dashboard/lib/lang/se.lng index 307e9e1ca1..0451661b3a 100644 --- a/interface/web/dashboard/lib/lang/se.lng +++ b/interface/web/dashboard/lib/lang/se.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/sk.lng b/interface/web/dashboard/lib/lang/sk.lng index 246054599f..ad0858d861 100644 --- a/interface/web/dashboard/lib/lang/sk.lng +++ b/interface/web/dashboard/lib/lang/sk.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/lib/lang/tr.lng b/interface/web/dashboard/lib/lang/tr.lng index fea8a3ae5a..599e2052fb 100644 --- a/interface/web/dashboard/lib/lang/tr.lng +++ b/interface/web/dashboard/lib/lang/tr.lng @@ -1,4 +1,5 @@ diff --git a/interface/web/dashboard/templates/dashboard.htm b/interface/web/dashboard/templates/dashboard.htm index 7c8b46e2a2..bd9553c8ba 100644 --- a/interface/web/dashboard/templates/dashboard.htm +++ b/interface/web/dashboard/templates/dashboard.htm @@ -1,5 +1,8 @@ diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 51a7a66bd9..9f4d851af0 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -267,12 +267,20 @@ if(count($_POST) > 0) { fwrite($authlog_handle, $authlog ."\n"); fclose($authlog_handle); + // get last IP used to login + $user_data = $app->db->queryOneRecord("SELECT last_login_ip,last_login_at FROM sys_user WHERE username = ?", $username); + + $_SESSION['s']['last_login_ip'] = $user_data['last_login_ip']; + $_SESSION['s']['last_login_at'] = $user_data['last_login_at']; + if(!$loginAs) { + $app->db->query("UPDATE sys_user SET last_login_ip = ?, last_login_at = ? WHERE username = ?", $_SERVER['REMOTE_ADDR'], time(), $username); + } /* * We need LOGIN_REDIRECT instead of HEADER_REDIRECT to load the * new theme, if the logged-in user has another */ - if ($loginAs){ + if($loginAs) { echo 'LOGIN_REDIRECT:'.$_SESSION['s']['module']['startpage']; exit; } else { @@ -284,8 +292,7 @@ if(count($_POST) > 0) { $error = $app->lng('error_user_blocked'); } } else { - if(!$alreadyfailed['times'] ) - { + if(!$alreadyfailed['times']) { //* user login the first time wrong $sql = "INSERT INTO `attempts_login` (`ip`, `times`, `login_time`) VALUES (?, 1, NOW())"; $app->db->query($sql, $ip); -- GitLab From db2586101d475ea9e54bae3cc36fb5dc7e9f7183 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Thu, 15 Dec 2016 22:12:58 +0100 Subject: [PATCH 071/302] remove impossible function --- interface/lib/classes/remote.d/mail.inc.php | 14 -------------- interface/web/mail/lib/remote.conf.php | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index 76cce5ed66..a7f84678de 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -1250,20 +1250,6 @@ class remoting_mail extends remoting { } } - public function xmpp_user_get_by_domain($session_id, $domain) { - global $app; - if(!$this->checkPerm($session_id, 'xmpp_user_get_by_domain')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - if (!empty($domain)) { - $sql = "SELECT * FROM xmpp_user WHERE domain = ?"; - $result = $app->db->queryAllRecords($sql, $domain); - return $result; - } - return false; - } - public function xmpp_user_set_status($session_id, $primary_id, $status) { global $app; if(!$this->checkPerm($session_id, 'xmpp_user_set_status')) { diff --git a/interface/web/mail/lib/remote.conf.php b/interface/web/mail/lib/remote.conf.php index 491bfbc1b9..012b3b673b 100644 --- a/interface/web/mail/lib/remote.conf.php +++ b/interface/web/mail/lib/remote.conf.php @@ -20,6 +20,6 @@ $function_list['mail_user_filter_get,mail_user_filter_add,mail_user_filter_updat $function_list['mail_user_backup'] = 'Mail Backup functions'; $function_list['mail_filter_get,mail_filter_add,mail_filter_update,mail_filter_delete'] = 'Mail filter functions'; $function_list['xmpp_domain_get,xmpp_domain_add,xmpp_domain_update,xmpp_domain_delete,xmpp_domain_set_status,xmpp_domain_get_by_domain'] = 'XMPP domain functions'; -$function_list['xmpp_user_get,xmpp_user_add,xmpp_user_update,xmpp_user_delete,xmpp_user_set_status,xmpp_user_get_by_domain'] = 'XMPP user functions'; +$function_list['xmpp_user_get,xmpp_user_add,xmpp_user_update,xmpp_user_delete,xmpp_user_set_status'] = 'XMPP user functions'; ?> \ No newline at end of file -- GitLab From 98edd73bca0a2f5b0bfb0de0c36c270e61d677e8 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Thu, 15 Dec 2016 22:13:43 +0100 Subject: [PATCH 072/302] fix sql field --- interface/lib/classes/remote.d/mail.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index a7f84678de..25bc1e8f3f 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -1262,7 +1262,7 @@ class remoting_mail extends remoting { } else { $status = 'n'; } - $sql = "UPDATE xmpp_user SET active = ? WHERE domain_id = ?"; + $sql = "UPDATE xmpp_user SET active = ? WHERE xmppuser_id = ?"; $app->db->query($sql, $status, $primary_id); $result = $app->db->affectedRows(); return $result; -- GitLab From cbf62d44e1f226837c3ffb549b1d5ec783429101 Mon Sep 17 00:00:00 2001 From: Timo Date: Fri, 16 Dec 2016 12:26:01 +0100 Subject: [PATCH 073/302] Adds required SQL Statements --- install/sql/incremental/upd_dev_collection.sql | 2 ++ install/sql/ispconfig3.sql | 2 ++ 2 files changed, 4 insertions(+) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index c44c39ab57..0de0a980a1 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -10,3 +10,5 @@ ALTER TABLE `mail_mailinglist` ADD `mail_footer` mediumtext; ALTER TABLE `mail_mailinglist` ADD `subscribe_policy` enum('disabled','confirm','approval','both','none') NOT NULL DEFAULT 'confirm'; ALTER TABLE `mail_mailinglist` ADD `posting_policy` enum('closed','moderated','free') NOT NULL DEFAULT 'free'; ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL; +ALTER TABLE `sys_user` ADD `last_login_ip` VARCHAR(50) NULL AFTER `lost_password_reqtime`; +ALTER TABLE `sys_user` ADD `last_login_at` BIGINT(20) NULL AFTER `last_login_ip`; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 7da5fdbf33..f848ab4bc6 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1813,6 +1813,8 @@ CREATE TABLE `sys_user` ( `lost_password_function` tinyint(1) NOT NULL default '1', `lost_password_hash` VARCHAR(50) NOT NULL default '', `lost_password_reqtime` DATETIME NULL default NULL, + `last_login_ip` varchar(50) DEFAULT NULL, + `last_login_at` bigint(20) DEFAULT NULL, PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- GitLab From 0078089569015d20e35e143671d313c6587115cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Thu, 29 Dec 2016 14:11:35 +0100 Subject: [PATCH 074/302] fixed #4397 --- server/mods-available/remoteaction_core_module.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php index 807de5060a..15e9d279e9 100644 --- a/server/mods-available/remoteaction_core_module.inc.php +++ b/server/mods-available/remoteaction_core_module.inc.php @@ -172,16 +172,17 @@ class remoteaction_core_module { /* * Do the update */ - exec("aptitude update"); - exec("aptitude safe-upgrade -y"); + //Guess this is not wanted here? + //exec("aptitude update"); + //exec("aptitude safe-upgrade -y"); //TODO : change this when distribution information has been integrated into server record if(file_exists('/etc/gentoo-release')) { exec("glsa-check -f --nocolor affected"); } else { - exec("aptitude update"); - exec("aptitude safe-upgrade -y"); + exec("apt-get update"); + exec("apt-get -y upgrade"); } /* -- GitLab From d2d9106f73afd454eb7b49dee31fc3dae8aea5c5 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Mon, 2 Jan 2017 14:05:27 +0100 Subject: [PATCH 075/302] interject login button --- interface/web/login/templates/index.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/login/templates/index.htm b/interface/web/login/templates/index.htm index 9a75a66cbd..3662dff52b 100644 --- a/interface/web/login/templates/index.htm +++ b/interface/web/login/templates/index.htm @@ -21,8 +21,8 @@
- +
-- GitLab From cd8c97fd81c62d9789408f90f674342068d63051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Tue, 3 Jan 2017 09:48:50 +0100 Subject: [PATCH 076/302] Bind9 should not tell its version into public --- install/tpl/named.conf.options.master | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/tpl/named.conf.options.master b/install/tpl/named.conf.options.master index f13976ffd6..37182dfba9 100644 --- a/install/tpl/named.conf.options.master +++ b/install/tpl/named.conf.options.master @@ -22,6 +22,8 @@ options { dnssec-validation yes; dnssec-lookaside auto; + version "DNS managed by ISPConfig"; + auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; }; -- GitLab From 65610f5d7c1db0e99be353fd0cff68523240b8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Tue, 3 Jan 2017 14:18:22 +0100 Subject: [PATCH 077/302] normalized some banners to hide versions --- install/tpl/apache_ispconfig.conf.master | 7 +++++++ install/tpl/debian6_dovecot.conf.master | 2 +- install/tpl/debian_dovecot.conf.master | 2 +- install/tpl/debian_postfix.conf.master | 1 + install/tpl/fedora_dovecot.conf.master | 2 +- install/tpl/fedora_postfix.conf.master | 1 + install/tpl/gentoo_postfix.conf.master | 1 + install/tpl/opensuse_dovecot.conf.master | 2 +- install/tpl/opensuse_postfix.conf.master | 1 + 9 files changed, 15 insertions(+), 4 deletions(-) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index 0dac415df2..ec3088b849 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -1,3 +1,10 @@ +################################################ +# ISPConfig General Apache Options +################################################ + +ServerSignature Off + + ################################################ # ISPConfig Logfile configuration for vlogger diff --git a/install/tpl/debian6_dovecot.conf.master b/install/tpl/debian6_dovecot.conf.master index 4286689cd4..b45d666c93 100644 --- a/install/tpl/debian6_dovecot.conf.master +++ b/install/tpl/debian6_dovecot.conf.master @@ -18,7 +18,7 @@ ssl_key_file = /etc/postfix/smtpd.key mail_privileged_group = mail -login_greeting = ISPConfig3 IMAP server ready... +login_greeting = MailServer managed by ISPConfig ## IMAP specific settings protocol imap { diff --git a/install/tpl/debian_dovecot.conf.master b/install/tpl/debian_dovecot.conf.master index 8d6022502f..070e6dde3c 100644 --- a/install/tpl/debian_dovecot.conf.master +++ b/install/tpl/debian_dovecot.conf.master @@ -178,7 +178,7 @@ ssl_key_file = /etc/postfix/smtpd.key #login_max_connections = 256 # Greeting message for clients. -#login_greeting = Dovecot ready. +login_greeting = MailServer managed by ISPConfig # Space-separated list of elements we want to log. The elements which have # a non-empty variable value are joined together to form a comma-separated diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master index dce69b097a..f9400866c8 100644 --- a/install/tpl/debian_postfix.conf.master +++ b/install/tpl/debian_postfix.conf.master @@ -43,3 +43,4 @@ smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3 smtpd_tls_exclude_ciphers = RC4, aNULL smtp_tls_exclude_ciphers = RC4, aNULL +smtpd_banner = MailServer managed by ISPConfig diff --git a/install/tpl/fedora_dovecot.conf.master b/install/tpl/fedora_dovecot.conf.master index cfac856414..30618fe332 100644 --- a/install/tpl/fedora_dovecot.conf.master +++ b/install/tpl/fedora_dovecot.conf.master @@ -180,7 +180,7 @@ ssl_key_file = /etc/postfix/smtpd.key #login_max_connections = 256 # Greeting message for clients. -#login_greeting = Dovecot ready. +login_greeting = MailServer managed by ISPConfig # Space separated list of trusted network ranges. Connections from these # IPs are allowed to override their IP addresses and ports (for logging and diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master index 3aa69ae25a..64ecc58f0c 100644 --- a/install/tpl/fedora_postfix.conf.master +++ b/install/tpl/fedora_postfix.conf.master @@ -40,3 +40,4 @@ smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3 smtpd_tls_exclude_ciphers = RC4, aNULL smtp_tls_exclude_ciphers = RC4, aNULL +smtpd_banner = MailServer managed by ISPConfig diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master index b40a9a71d3..b42525944d 100644 --- a/install/tpl/gentoo_postfix.conf.master +++ b/install/tpl/gentoo_postfix.conf.master @@ -39,3 +39,4 @@ smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3 smtpd_tls_exclude_ciphers = RC4, aNULL smtp_tls_exclude_ciphers = RC4, aNULL +smtpd_banner = MailServer managed by ISPConfig diff --git a/install/tpl/opensuse_dovecot.conf.master b/install/tpl/opensuse_dovecot.conf.master index 9d345fa911..2ecab07876 100644 --- a/install/tpl/opensuse_dovecot.conf.master +++ b/install/tpl/opensuse_dovecot.conf.master @@ -187,7 +187,7 @@ ssl_key_file = /etc/postfix/smtpd.key #login_max_connections = 256 # Greeting message for clients. -#login_greeting = Dovecot ready. +login_greeting = MailServer managed by ISPConfig # Space separated list of trusted network ranges. Connections from these # IPs are allowed to override their IP addresses and ports (for logging and diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master index cb021b27e5..90c1638ded 100644 --- a/install/tpl/opensuse_postfix.conf.master +++ b/install/tpl/opensuse_postfix.conf.master @@ -42,3 +42,4 @@ smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3 smtpd_tls_exclude_ciphers = RC4, aNULL smtp_tls_exclude_ciphers = RC4, aNULL +smtpd_banner = MailServer managed by ISPConfig -- GitLab From 59b38df21e57e7f11d3c6a2057e2c1f578716848 Mon Sep 17 00:00:00 2001 From: Costin Date: Tue, 3 Jan 2017 14:21:30 +0100 Subject: [PATCH 078/302] Update update.php --- install/update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/update.php b/install/update.php index 1245b05141..ff6fc45813 100644 --- a/install/update.php +++ b/install/update.php @@ -271,7 +271,7 @@ if($conf['mysql']['master_slave_setup'] == 'y') { // initialize the connection to the master database $inst->dbmaster = new db(); if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_port"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); $inst->dbmaster->setDBName($conf['mysql']["master_database"]); } else { $inst->dbmaster = $inst->db; -- GitLab From d2aa6966e7c55e08b27c3fb5f8a6465a217ce5e9 Mon Sep 17 00:00:00 2001 From: Costin Date: Tue, 3 Jan 2017 14:24:09 +0100 Subject: [PATCH 079/302] Update mysql.lib.php --- install/lib/mysql.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index 7cf06ee044..c4943d4fac 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -96,15 +96,16 @@ class db extends mysqli $this->_setCharset(); } - public function setDBData($host, $user, $password) { + public function setDBData($host, $port, $user, $password) { $this->dbHost = $host; + $this->dbPort = $port; $this->dbUser = $user; $this->dbPass = $password; } public function setDBName($name) { $this->dbName = $name; - $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); + $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', $this->dbPort); if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { $this->close(); $this->_sqlerror('Datenbank nicht gefunden / Database not found'); -- GitLab From e7693ad19df88ec16bb673225f60e870e3e52490 Mon Sep 17 00:00:00 2001 From: Costin Date: Tue, 3 Jan 2017 14:34:20 +0100 Subject: [PATCH 080/302] Update install.php --- install/install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.php b/install/install.php index 3418f5c00d..e2a7b68cad 100644 --- a/install/install.php +++ b/install/install.php @@ -278,7 +278,7 @@ if($install_mode == 'expert' && strtolower($inst->simple_query('Shall this serve // initialize the connection to the master database $inst->dbmaster = new db(); if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_port"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); $inst->dbmaster->setDBName($conf['mysql']["master_database"]); } else { -- GitLab From d0c5a700c996007f4a5b85e47f56b46ff757c3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Wed, 4 Jan 2017 09:31:20 +0100 Subject: [PATCH 081/302] better apache security, fixed NameVirtualHost Warnings Warning: Please read Merge Request! This might cause Apache not to listen on custom ports! --- install/tpl/apache_ispconfig.conf.master | 5 +++-- install/tpl/apache_ispconfig.vhost.master | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index ec3088b849..c6a3b651a8 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -1,7 +1,7 @@ ################################################ # ISPConfig General Apache Options ################################################ - +ServerTokens ProductOnly ServerSignature Off @@ -137,9 +137,10 @@ Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-know
+ NameVirtualHost *:80 NameVirtualHost *:443 NameVirtualHost {tmpl_var name="ip_address"}:{tmpl_var name="port"} - + diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master index 8eccbcba38..2a2fa5d2db 100644 --- a/install/tpl/apache_ispconfig.vhost.master +++ b/install/tpl/apache_ispconfig.vhost.master @@ -4,7 +4,7 @@ ###################################################### Listen -NameVirtualHost *: +NameVirtualHost *: > ServerAdmin webmaster@localhost -- GitLab From 05e1637e3e49395fc2fb31f716994c070c2d6dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=2E=20T=C3=A4ffner?= Date: Wed, 4 Jan 2017 09:46:32 +0100 Subject: [PATCH 082/302] PureFTP Welcome Message --- install/lib/installer_base.lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 5226394f34..5309c91dca 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1551,6 +1551,9 @@ class installer_base { } if(!is_file('/etc/pure-ftpd/conf/DontResolve')) exec('echo "yes" > /etc/pure-ftpd/conf/DontResolve'); + + if(!is_file('/etc/pure-ftpd/welcome.msg')) exec('echo "FTP managed by ISPConfig" > /etc/pure-ftpd/welcome.msg'); + if(!is_file('/etc/pure-ftpd/conf/FortunesFile')) exec('echo "/etc/pure-ftpd/welcome.msg" > /etc/pure-ftpd/conf/FortunesFile'); } public function configure_mydns() { -- GitLab From 2bd5ce7bbea4d91b0f47065b789d60ba2c747686 Mon Sep 17 00:00:00 2001 From: Janek Date: Thu, 12 Jan 2017 23:20:33 +0100 Subject: [PATCH 083/302] Fixed "Wrong QuerySQL-Query" in aps_installer --- server/lib/classes/aps_installer.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 5270a5ae9e..9b601d90b3 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -306,7 +306,7 @@ class ApsInstaller extends ApsBase $db_id = parent::getXPathValue($sxe, '//db:id'); if(empty($db_id)) return; // No database needed - $mysqlver_res = $app->db->queryOneRecord('SELECT VERSION() as ver;'); + $mysqlver_res = $app->db->queryOneRecord('SELECT VERSION() as ver'); $mysqlver = $mysqlver_res['ver']; $tmp = $app->db->queryOneRecord("SELECT value FROM aps_instances_settings WHERE name = 'main_database_password' AND instance_id = ?", $task['instance_id']); -- GitLab From c91b11d878f8231f96a77d9d55c481a0e5ef31ca Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sun, 15 Jan 2017 17:09:02 +0100 Subject: [PATCH 084/302] Introduced new -processing- state for remote actions. The -processing- state is set by long running background actions to allow the action procedure to proceed with the next action. --- install/sql/incremental/upd_dev_collection.sql | 1 + install/sql/ispconfig3.sql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 0de0a980a1..1a5b0689eb 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -12,3 +12,4 @@ ALTER TABLE `mail_mailinglist` ADD `posting_policy` enum('closed','moderated','f ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL; ALTER TABLE `sys_user` ADD `last_login_ip` VARCHAR(50) NULL AFTER `lost_password_reqtime`; ALTER TABLE `sys_user` ADD `last_login_at` BIGINT(20) NULL AFTER `last_login_ip`; +ALTER TABLE `sys_remoteaction` CHANGE `action_state` `action_state` ENUM('pending','processing','ok','warning','error') NOT NULL DEFAULT 'pending'; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 6de0ce049a..b15a1c89dc 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1743,7 +1743,7 @@ CREATE TABLE `sys_remoteaction` ( `tstamp` int(11) NOT NULL DEFAULT '0', `action_type` varchar(20) NOT NULL DEFAULT '', `action_param` mediumtext, - `action_state` enum('pending','ok','warning','error') NOT NULL DEFAULT 'pending', + `action_state` enum('pending','processing','ok','warning','error') NOT NULL DEFAULT 'pending', `response` mediumtext, PRIMARY KEY (`action_id`), KEY `server_id` (`server_id`) -- GitLab From 2748bbf998a1c28f31803ff7298d260f54c55106 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 17 Jan 2017 12:39:50 +0100 Subject: [PATCH 085/302] revert changes to postfix-config to prevent break the smtp-protocol --- install/tpl/debian_postfix.conf.master | 1 - install/tpl/fedora_postfix.conf.master | 1 - install/tpl/gentoo_postfix.conf.master | 1 - install/tpl/opensuse_postfix.conf.master | 1 - 4 files changed, 4 deletions(-) diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master index f9400866c8..dce69b097a 100644 --- a/install/tpl/debian_postfix.conf.master +++ b/install/tpl/debian_postfix.conf.master @@ -43,4 +43,3 @@ smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3 smtpd_tls_exclude_ciphers = RC4, aNULL smtp_tls_exclude_ciphers = RC4, aNULL -smtpd_banner = MailServer managed by ISPConfig diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master index 64ecc58f0c..3aa69ae25a 100644 --- a/install/tpl/fedora_postfix.conf.master +++ b/install/tpl/fedora_postfix.conf.master @@ -40,4 +40,3 @@ smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3 smtpd_tls_exclude_ciphers = RC4, aNULL smtp_tls_exclude_ciphers = RC4, aNULL -smtpd_banner = MailServer managed by ISPConfig diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master index b42525944d..b40a9a71d3 100644 --- a/install/tpl/gentoo_postfix.conf.master +++ b/install/tpl/gentoo_postfix.conf.master @@ -39,4 +39,3 @@ smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3 smtpd_tls_exclude_ciphers = RC4, aNULL smtp_tls_exclude_ciphers = RC4, aNULL -smtpd_banner = MailServer managed by ISPConfig diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master index 90c1638ded..cb021b27e5 100644 --- a/install/tpl/opensuse_postfix.conf.master +++ b/install/tpl/opensuse_postfix.conf.master @@ -42,4 +42,3 @@ smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3 smtpd_tls_exclude_ciphers = RC4, aNULL smtp_tls_exclude_ciphers = RC4, aNULL -smtpd_banner = MailServer managed by ISPConfig -- GitLab From fc72e88ad8b730dc5000366f03080f88cb3e74ce Mon Sep 17 00:00:00 2001 From: Rene Koch Date: Thu, 19 Jan 2017 15:08:02 +0100 Subject: [PATCH 086/302] added support for named-chroot --- server/mods-available/dns_module.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/mods-available/dns_module.inc.php b/server/mods-available/dns_module.inc.php index d3c13031c0..2983a06755 100644 --- a/server/mods-available/dns_module.inc.php +++ b/server/mods-available/dns_module.inc.php @@ -126,6 +126,10 @@ class dns_module { $daemon = ''; if(is_file($conf['init_scripts'] . '/' . 'bind9')) { $daemon = 'bind9'; + }elseif(is_file($conf['init_scripts'] . '/' . 'named-chroot')) { + $daemon = 'named-chroot'; + }elseif(is_file('/usr/lib/systemd/system/named-chroot.service')) { + $daemon = 'named-chroot'; } else { $daemon = 'named'; } -- GitLab From c0e7328c2819f659bab5100c0c70e0d393b77660 Mon Sep 17 00:00:00 2001 From: Rene Koch Date: Thu, 19 Jan 2017 15:15:30 +0100 Subject: [PATCH 087/302] add support for RHSCL (Apache 2.4) --- server/mods-available/web_module.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php index 6d3e8c1083..6bb034e8b3 100644 --- a/server/mods-available/web_module.inc.php +++ b/server/mods-available/web_module.inc.php @@ -203,7 +203,9 @@ class web_module { $daemon = $web_config['server_type']; break; default: - if(is_file($conf['init_scripts'] . '/' . 'httpd') || is_dir('/etc/httpd')) { + if(is_file($conf['init_scripts'] . '/' . 'httpd24-httpd') || is_dir('/opt/rh/httpd24/root/etc/httpd') { + $daemon = 'httpd24-httpd'; + } elseif(is_file($conf['init_scripts'] . '/' . 'httpd') || is_dir('/etc/httpd')) { $daemon = 'httpd'; } else { $daemon = 'apache2'; -- GitLab From e3139e26e8adc7d251b554602026fc1662e5ed66 Mon Sep 17 00:00:00 2001 From: Rene Koch Date: Tue, 24 Jan 2017 15:09:19 +0100 Subject: [PATCH 088/302] fixed issue with missing bracket --- server/mods-available/web_module.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php index 6bb034e8b3..a323eb9506 100644 --- a/server/mods-available/web_module.inc.php +++ b/server/mods-available/web_module.inc.php @@ -203,7 +203,7 @@ class web_module { $daemon = $web_config['server_type']; break; default: - if(is_file($conf['init_scripts'] . '/' . 'httpd24-httpd') || is_dir('/opt/rh/httpd24/root/etc/httpd') { + if(is_file($conf['init_scripts'] . '/' . 'httpd24-httpd') || is_dir('/opt/rh/httpd24/root/etc/httpd')) { $daemon = 'httpd24-httpd'; } elseif(is_file($conf['init_scripts'] . '/' . 'httpd') || is_dir('/etc/httpd')) { $daemon = 'httpd'; -- GitLab From 1d5cbdb89d101056e12be0298bd57394b1ecbbb0 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 31 Jan 2017 23:00:37 -0600 Subject: [PATCH 089/302] added support for newer versions of mariadb-server --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index dbd35da95d..0ad7c62d74 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -227,7 +227,7 @@ class installer_base { //* check sql-mode $check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode"); - if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') { + if(!strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; echo"to the mysqld-section in your mysql-config and restart mysqld afterwards\n"; -- GitLab From 35c60487de3e8a78d2cfd1124ef8f5e651e487a0 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 31 Jan 2017 23:25:48 -0600 Subject: [PATCH 090/302] deleted empty spaces after ?> generating noise in cron log --- server/plugins-available/backup_plugin.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 4eb8735f53..6d89eb6ac2 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -315,5 +315,4 @@ class backup_plugin { } // end class -?> - +?> \ No newline at end of file -- GitLab From 7678f4c57eb86f3a81b34621444f14e76451e3b3 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 00:06:16 -0600 Subject: [PATCH 091/302] added ftp settings --- install/lib/installer_base.lib.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 0ad7c62d74..8c035aff68 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1534,11 +1534,6 @@ class installer_base { chmod($config_dir.'/'.$configfile, 0600); chown($config_dir.'/'.$configfile, 'root'); chgrp($config_dir.'/'.$configfile, 'root'); - // **enable chrooting - //exec('mkdir -p '.$config_dir.'/conf/ChrootEveryone'); - exec('echo "yes" > '.$config_dir.'/conf/ChrootEveryone'); - exec('echo "yes" > '.$config_dir.'/conf/BrokenClientsCompatibility'); - exec('echo "yes" > '.$config_dir.'/conf/DisplayDotFiles'); if(is_file('/etc/default/pure-ftpd-common')) { replaceLine('/etc/default/pure-ftpd-common', 'STANDALONE_OR_INETD=inetd', 'STANDALONE_OR_INETD=standalone', 1, 0); @@ -1551,10 +1546,20 @@ class installer_base { //if(is_file($conf['init_scripts'].'/'.'openbsd-inetd')) exec($conf['init_scripts'].'/'.'openbsd-inetd restart'); } - if(!is_file('/etc/pure-ftpd/conf/DontResolve')) exec('echo "yes" > /etc/pure-ftpd/conf/DontResolve'); - - if(!is_file('/etc/pure-ftpd/welcome.msg')) exec('echo "FTP managed by ISPConfig" > /etc/pure-ftpd/welcome.msg'); - if(!is_file('/etc/pure-ftpd/conf/FortunesFile')) exec('echo "/etc/pure-ftpd/welcome.msg" > /etc/pure-ftpd/conf/FortunesFile'); + //backup old settings and write new ones + exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; done > $config_dir/conf/.backup~"); + exec("echo yes > $config_dir/conf/BrokenClientsCompatibility"); + exec("echo yes > $config_dir/conf/ChrootEveryone"); + exec("echo yes > $config_dir/conf/DisplayDotFiles"); + exec("echo yes > $config_dir/conf/DontResolve"); + exec("echo UTF-8 > $config_dir/conf/FSCharset"); + exec("echo $config_dir/welcome.msg > $config_dir/conf/FortunesFile"); + exec("echo 128 > $config_dir/conf/MaxClientsNumber"); + exec("echo 16 > $config_dir/conf/MaxClientsPerIP"); + exec("echo $config_dir/db/mysql.conf > $config_dir/conf/MySQLConfigFile"); + exec("echo yes > $config_dir/conf/NoAnonymous"); + exec("echo ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:\!RC4 > $config_dir/conf/TLSCipherSuite"); + exec("echo Welcome > $config_dir/welcome.msg"); } public function configure_mydns() { -- GitLab From 36ff1c03f06a5984ea436f1eef0688bc87065a39 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 00:09:40 -0600 Subject: [PATCH 092/302] tabs corrected --- install/lib/installer_base.lib.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 8c035aff68..a821524cfa 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1547,19 +1547,19 @@ class installer_base { } //backup old settings and write new ones - exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; done > $config_dir/conf/.backup~"); - exec("echo yes > $config_dir/conf/BrokenClientsCompatibility"); - exec("echo yes > $config_dir/conf/ChrootEveryone"); - exec("echo yes > $config_dir/conf/DisplayDotFiles"); - exec("echo yes > $config_dir/conf/DontResolve"); - exec("echo UTF-8 > $config_dir/conf/FSCharset"); - exec("echo $config_dir/welcome.msg > $config_dir/conf/FortunesFile"); - exec("echo 128 > $config_dir/conf/MaxClientsNumber"); - exec("echo 16 > $config_dir/conf/MaxClientsPerIP"); - exec("echo $config_dir/db/mysql.conf > $config_dir/conf/MySQLConfigFile"); - exec("echo yes > $config_dir/conf/NoAnonymous"); - exec("echo ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:\!RC4 > $config_dir/conf/TLSCipherSuite"); - exec("echo Welcome > $config_dir/welcome.msg"); + exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; done > $config_dir/conf/.backup~"); + exec("echo yes > $config_dir/conf/BrokenClientsCompatibility"); + exec("echo yes > $config_dir/conf/ChrootEveryone"); + exec("echo yes > $config_dir/conf/DisplayDotFiles"); + exec("echo yes > $config_dir/conf/DontResolve"); + exec("echo UTF-8 > $config_dir/conf/FSCharset"); + exec("echo $config_dir/welcome.msg > $config_dir/conf/FortunesFile"); + exec("echo 128 > $config_dir/conf/MaxClientsNumber"); + exec("echo 16 > $config_dir/conf/MaxClientsPerIP"); + exec("echo $config_dir/db/mysql.conf > $config_dir/conf/MySQLConfigFile"); + exec("echo yes > $config_dir/conf/NoAnonymous"); + exec("echo ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:\!RC4 > $config_dir/conf/TLSCipherSuite"); + exec("echo Welcome > $config_dir/welcome.msg"); } public function configure_mydns() { -- GitLab From b8741df566b6074fa8de4e590384d21019bf42b9 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 05:11:13 -0600 Subject: [PATCH 093/302] added support for newer versions of mariadb-server/mysql-server --- install/lib/update.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 581e2d69cb..655fc8a45d 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -125,7 +125,7 @@ function updateDbAndIni() { //* check sql-mode $check_sql_mode = $inst->db->queryOneRecord("SELECT @@sql_mode"); - if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') { + if(!strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; echo"to the mysqld-section in your mysql-config and restart mysqld afterwards\n"; -- GitLab From 038f68681671fc267db690d625e714e10ec3d1b8 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 05:17:39 -0600 Subject: [PATCH 094/302] tabs corrected --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index a821524cfa..bcc0f99478 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1546,7 +1546,7 @@ class installer_base { //if(is_file($conf['init_scripts'].'/'.'openbsd-inetd')) exec($conf['init_scripts'].'/'.'openbsd-inetd restart'); } - //backup old settings and write new ones + //backup old settings and write new ones exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; done > $config_dir/conf/.backup~"); exec("echo yes > $config_dir/conf/BrokenClientsCompatibility"); exec("echo yes > $config_dir/conf/ChrootEveryone"); -- GitLab From f002e23b8384b79297c905fb560533c378d0173e Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 05:44:05 -0600 Subject: [PATCH 095/302] added commentes --- install/lib/installer_base.lib.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index bcc0f99478..6364fa7de1 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1548,17 +1548,29 @@ class installer_base { //backup old settings and write new ones exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; done > $config_dir/conf/.backup~"); + //improves client compatibility exec("echo yes > $config_dir/conf/BrokenClientsCompatibility"); + //needed for ispconfig implementation exec("echo yes > $config_dir/conf/ChrootEveryone"); + //improves client compatibility exec("echo yes > $config_dir/conf/DisplayDotFiles"); + //improves performance exec("echo yes > $config_dir/conf/DontResolve"); + //complies with RFC2640 exec("echo UTF-8 > $config_dir/conf/FSCharset"); + //provides welcome message exec("echo $config_dir/welcome.msg > $config_dir/conf/FortunesFile"); + //increases the clients limit from 50 (default) to 128 exec("echo 128 > $config_dir/conf/MaxClientsNumber"); + //prevents DoS attack from the same IP address exec("echo 16 > $config_dir/conf/MaxClientsPerIP"); + //needed for ispconfig implementation exec("echo $config_dir/db/mysql.conf > $config_dir/conf/MySQLConfigFile"); + //needed for ispconfig implementation exec("echo yes > $config_dir/conf/NoAnonymous"); + //grade A encryption exec("echo ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:\!RC4 > $config_dir/conf/TLSCipherSuite"); + //hides implementation details exec("echo Welcome > $config_dir/welcome.msg"); } -- GitLab From e91539d184f6c04bead8df59e1026d3702712062 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 05:57:21 -0600 Subject: [PATCH 096/302] imrpoved comments --- install/lib/installer_base.lib.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 6364fa7de1..9767688c9f 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1546,31 +1546,31 @@ class installer_base { //if(is_file($conf['init_scripts'].'/'.'openbsd-inetd')) exec($conf['init_scripts'].'/'.'openbsd-inetd restart'); } - //backup old settings and write new ones + //* backup old settings exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; done > $config_dir/conf/.backup~"); - //improves client compatibility + //* improves client compatibility exec("echo yes > $config_dir/conf/BrokenClientsCompatibility"); - //needed for ispconfig implementation + //* needed for ispconfig implementation exec("echo yes > $config_dir/conf/ChrootEveryone"); - //improves client compatibility + //* improves client compatibility exec("echo yes > $config_dir/conf/DisplayDotFiles"); - //improves performance + //* improves performance exec("echo yes > $config_dir/conf/DontResolve"); - //complies with RFC2640 + //* complies with RFC2640 exec("echo UTF-8 > $config_dir/conf/FSCharset"); - //provides welcome message + //* provides welcome message exec("echo $config_dir/welcome.msg > $config_dir/conf/FortunesFile"); - //increases the clients limit from 50 (default) to 128 - exec("echo 128 > $config_dir/conf/MaxClientsNumber"); - //prevents DoS attack from the same IP address - exec("echo 16 > $config_dir/conf/MaxClientsPerIP"); - //needed for ispconfig implementation + //* increases the clients limit from 50 (default) to 1024 + exec("echo 1024 > $config_dir/conf/MaxClientsNumber"); + //* prevents DoS attack from the same IP address + exec("echo 64 > $config_dir/conf/MaxClientsPerIP"); + //* needed for ispconfig implementation exec("echo $config_dir/db/mysql.conf > $config_dir/conf/MySQLConfigFile"); - //needed for ispconfig implementation + //* needed for ispconfig implementation exec("echo yes > $config_dir/conf/NoAnonymous"); - //grade A encryption + //* grade A encryption exec("echo ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:\!RC4 > $config_dir/conf/TLSCipherSuite"); - //hides implementation details + //* hides implementation details exec("echo Welcome > $config_dir/welcome.msg"); } -- GitLab From 4858503d00d8736c3465c2ac21e008e309588b1a Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 14:06:47 -0600 Subject: [PATCH 097/302] improved ftp --- install/lib/installer_base.lib.php | 56 ++++++++++++++++-------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 9767688c9f..e6b19c7ac7 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1546,32 +1546,36 @@ class installer_base { //if(is_file($conf['init_scripts'].'/'.'openbsd-inetd')) exec($conf['init_scripts'].'/'.'openbsd-inetd restart'); } - //* backup old settings - exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; done > $config_dir/conf/.backup~"); - //* improves client compatibility - exec("echo yes > $config_dir/conf/BrokenClientsCompatibility"); - //* needed for ispconfig implementation - exec("echo yes > $config_dir/conf/ChrootEveryone"); - //* improves client compatibility - exec("echo yes > $config_dir/conf/DisplayDotFiles"); - //* improves performance - exec("echo yes > $config_dir/conf/DontResolve"); - //* complies with RFC2640 - exec("echo UTF-8 > $config_dir/conf/FSCharset"); - //* provides welcome message - exec("echo $config_dir/welcome.msg > $config_dir/conf/FortunesFile"); - //* increases the clients limit from 50 (default) to 1024 - exec("echo 1024 > $config_dir/conf/MaxClientsNumber"); - //* prevents DoS attack from the same IP address - exec("echo 64 > $config_dir/conf/MaxClientsPerIP"); - //* needed for ispconfig implementation - exec("echo $config_dir/db/mysql.conf > $config_dir/conf/MySQLConfigFile"); - //* needed for ispconfig implementation - exec("echo yes > $config_dir/conf/NoAnonymous"); - //* grade A encryption - exec("echo ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:\!RC4 > $config_dir/conf/TLSCipherSuite"); - //* hides implementation details - exec("echo Welcome > $config_dir/welcome.msg"); + if(!$this->is_update) { + //* backup old settings + exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; printf '\n'; done 2>&1 >$config_dir/conf/.backup~"); + //* clean common unused settings + exec("rm $config_dir/conf/MinUID $config_dir/conf/PAMAuthentication $config_dir/conf/PureDB $config_dir/conf/UnixAuthentication 2> /dev/null"); + //* improves client compatibility + file_put_contents("$config_dir/conf/BrokenClientsCompatibility","yes"); + //* needed for ispconfig implementation + file_put_contents("$config_dir/conf/ChrootEveryone","yes"); + //* improves client compatibility + file_put_contents("$config_dir/conf/DisplayDotFiles","yes"); + //* improves performance + file_put_contents("$config_dir/conf/DontResolve","yes"); + //* complies with RFC2640 + file_put_contents("$config_dir/conf/FSCharset","UTF-8"); + //* provides welcome message + file_put_contents("$config_dir/conf/FortunesFile","$config_dir/welcome.msg"); + //* increases the clients limit from 50 (default) to 1024 + file_put_contents("$config_dir/conf/MaxClientsNumber","1024"); + //* prevents DoS attack from the same IP address + file_put_contents("$config_dir/conf/MaxClientsPerIP","64"); + //* needed for ispconfig implementation + file_put_contents("$config_dir/conf/MySQLConfigFile","$config_dir/db/mysql.conf"); + //* recommended for ispconfig implementation + file_put_contents("$config_dir/conf/NoAnonymous","yes"); + //* grade A encryption + file_put_contents("$config_dir/conf/TLSCipherSuite","ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!RC4"); + //* hides implementation details + file_put_contents("$config_dir/welcome.msg","Welcome"); + } } public function configure_mydns() { -- GitLab From f5bb4fb6e9de3b1272bafd27b41bb4e186747072 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 14:14:05 -0600 Subject: [PATCH 098/302] corrected meaning --- install/lib/installer_base.lib.php | 3 +-- install/lib/update.lib.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index e6b19c7ac7..8e61097207 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -226,8 +226,7 @@ class installer_base { //* check sql-mode $check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode"); - - if(!strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')) { + if($check_sql_mode['@@sql_mode']!='' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; echo"to the mysqld-section in your mysql-config and restart mysqld afterwards\n"; diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 655fc8a45d..05d243b7c1 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -125,7 +125,7 @@ function updateDbAndIni() { //* check sql-mode $check_sql_mode = $inst->db->queryOneRecord("SELECT @@sql_mode"); - if(!strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')) { + if($check_sql_mode['@@sql_mode']!='' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; echo"to the mysqld-section in your mysql-config and restart mysqld afterwards\n"; -- GitLab From 7f91b4300e99e72eac2874e7a4e254091885d2d7 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 14:44:54 -0600 Subject: [PATCH 099/302] Florian Schaal request --- install/lib/installer_base.lib.php | 2 +- install/lib/update.lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 8e61097207..18625a9de9 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -229,7 +229,7 @@ class installer_base { if($check_sql_mode['@@sql_mode']!='' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; - echo"to the mysqld-section in your mysql-config and restart mysqld afterwards\n"; + echo"to the mysqld-section in your mysql-config on this server\n"; die(); } diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 05d243b7c1..5e1f62f10b 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -128,7 +128,7 @@ function updateDbAndIni() { if($check_sql_mode['@@sql_mode']!='' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; - echo"to the mysqld-section in your mysql-config and restart mysqld afterwards\n"; + echo"to the mysqld-section in your mysql-config on this server\n"; die(); } -- GitLab From 4f33655c57211ab2e9ee734679db72d1d0ef55d9 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 15:01:21 -0600 Subject: [PATCH 100/302] Florian Schaal request --- install/lib/installer_base.lib.php | 2 +- install/lib/update.lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 18625a9de9..c077c6c88e 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -229,7 +229,7 @@ class installer_base { if($check_sql_mode['@@sql_mode']!='' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; - echo"to the mysqld-section in your mysql-config on this server\n"; + echo"to the mysqld-section in your mysql-config on the server\n"; die(); } diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 5e1f62f10b..a1113fd95c 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -128,7 +128,7 @@ function updateDbAndIni() { if($check_sql_mode['@@sql_mode']!='' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; - echo"to the mysqld-section in your mysql-config on this server\n"; + echo"to the mysqld-section in your mysql-config on the server\n"; die(); } -- GitLab From c86306aa40f1fbf38bdfb7d94b2e58ef829091a3 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 23:51:15 +0100 Subject: [PATCH 101/302] added spaces --- install/lib/update.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index a1113fd95c..27c9366604 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -125,7 +125,7 @@ function updateDbAndIni() { //* check sql-mode $check_sql_mode = $inst->db->queryOneRecord("SELECT @@sql_mode"); - if($check_sql_mode['@@sql_mode']!='' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { + if ($check_sql_mode['@@sql_mode'] != '' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; echo"to the mysqld-section in your mysql-config on the server\n"; -- GitLab From 208276b97884f7ab4ccd794850700d1ba3425484 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 1 Feb 2017 23:52:35 +0100 Subject: [PATCH 102/302] Update installer_base.lib.php --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index c077c6c88e..097b6a9ac3 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -226,7 +226,7 @@ class installer_base { //* check sql-mode $check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode"); - if($check_sql_mode['@@sql_mode']!='' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { + if ($check_sql_mode['@@sql_mode'] != '' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; echo"to the mysqld-section in your mysql-config on the server\n"; -- GitLab From a103201ab4585b3a739f14f9a97c8eb964923ae9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Feb 2017 16:53:50 -0600 Subject: [PATCH 103/302] fix for sql_mode --- install/lib/installer_base.lib.php | 9 +-------- install/lib/update.lib.php | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 097b6a9ac3..38a8214b92 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -224,14 +224,7 @@ class installer_base { public function configure_database() { global $conf; - //* check sql-mode - $check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode"); - if ($check_sql_mode['@@sql_mode'] != '' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { - echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; - echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; - echo"to the mysqld-section in your mysql-config on the server\n"; - die(); - } + $this->db->query("SET sql_mode = ''"); //** Create the database if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) { diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 27c9366604..83fb75c490 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -123,14 +123,7 @@ function checkDbHealth() { function updateDbAndIni() { global $inst, $conf; - //* check sql-mode - $check_sql_mode = $inst->db->queryOneRecord("SELECT @@sql_mode"); - if ($check_sql_mode['@@sql_mode'] != '' && strpos($check_sql_mode['@@sql_mode'],'NO_ENGINE_SUBSTITUTION')===false) { - echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; - echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; - echo"to the mysqld-section in your mysql-config on the server\n"; - die(); - } + $inst->db->query("SET sql_mode = ''"); //* Update $conf array with values from the server.ini that shall be preserved $tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); -- GitLab From e1dd7aab6fb1da69ae98a0ec7e9b4c7f25377aec Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Feb 2017 19:24:39 -0600 Subject: [PATCH 104/302] comments and mode added --- install/lib/installer_base.lib.php | 3 ++- install/lib/update.lib.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 38a8214b92..c44f1e214b 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -224,7 +224,8 @@ class installer_base { public function configure_database() { global $conf; - $this->db->query("SET sql_mode = ''"); + //* prevent substitution of ENGINE=MyISAM + $this->db->query("SET sql_mode = 'NO_ENGINE_SUBSTITUTION'"); //** Create the database if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) { diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 83fb75c490..8b6c7f76dd 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -123,7 +123,8 @@ function checkDbHealth() { function updateDbAndIni() { global $inst, $conf; - $inst->db->query("SET sql_mode = ''"); + //* prevent substitution of ENGINE=MyISAM + $this->db->query("SET sql_mode = 'NO_ENGINE_SUBSTITUTION'"); //* Update $conf array with values from the server.ini that shall be preserved $tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); -- GitLab From 75c4f025704c1e72efc22b3033b4899269967ec7 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Feb 2017 13:17:35 -0600 Subject: [PATCH 105/302] tested with 10.1.21-MariaDB-5 --- install/lib/installer_base.lib.php | 4 ++-- install/lib/update.lib.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index c44f1e214b..244355fa5d 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -224,8 +224,8 @@ class installer_base { public function configure_database() { global $conf; - //* prevent substitution of ENGINE=MyISAM - $this->db->query("SET sql_mode = 'NO_ENGINE_SUBSTITUTION'"); + //* ensure no modes with errors for ENGINE=MyISAM + $this->db->query("SET sql_mode = ''"); //** Create the database if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) { diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 8b6c7f76dd..6d2c5c8c14 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -123,8 +123,8 @@ function checkDbHealth() { function updateDbAndIni() { global $inst, $conf; - //* prevent substitution of ENGINE=MyISAM - $this->db->query("SET sql_mode = 'NO_ENGINE_SUBSTITUTION'"); + //* ensure no modes with errors for ENGINE=MyISAM + $this->db->query("SET sql_mode = ''"); //* Update $conf array with values from the server.ini that shall be preserved $tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); -- GitLab From 62aba30bdb42a382f71a43712d4334057fc61fbf Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Feb 2017 16:19:27 -0600 Subject: [PATCH 106/302] tRNG test added --- install/install.php | 8 +++++--- install/lib/install.lib.php | 10 ++++++++++ install/update.php | 10 +++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/install/install.php b/install/install.php index e2a7b68cad..3099c55062 100644 --- a/install/install.php +++ b/install/install.php @@ -174,6 +174,8 @@ $conf['language_file_import_enabled'] = true; //** Select installation mode $install_mode = $inst->simple_query('Installation mode', array('standard', 'expert'), 'standard','install_mode'); +//** tRNG dependencies +$conf['tRNG']=''; //** Get the hostname $tmp_out = array(); @@ -428,9 +430,7 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure DNS swriteln('Configuring BIND'); $inst->configure_bind(); $conf['services']['dns'] = true; - if(!is_installed('haveged')) { - swriteln("[INFO] haveged not detected - DNSSEC can fail"); - } + $conf['tRNG'] .= 'DNSSEC with BIND, '; } //* Configure MyDNS if($conf['mydns']['installed']) { @@ -623,6 +623,8 @@ if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') s if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '') system($inst->getinitcommand($conf['ufw']['init_script'], 'restart').' &> /dev/null'); if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); +//* test tRNG +if($conf['tRNG']) tRNG(); $inst->create_mount_script(); diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 684e3d2bd6..a5b1815210 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -948,4 +948,14 @@ function getapachemodules() { return $modules; } +function tRNG(){ + global $conf; + $path='/dev/random';$test='/tmp/ispconfig.tRNG';$time=8;$warn=8192; + echo "Testing $time seconds throughput of $path ..."; + exec("cat $path > $test & PID=\$!; sleep $time; kill \$PID"); + if(($result=filesize($test)) < $warn) { + echo "\n[WARN] these services may fail: {$conf['tRNG']}result: $result bytes, minimum recommended: $warn\n"; + }else echo " OK\n"; + unlink($test); +} ?> diff --git a/install/update.php b/install/update.php index ff6fc45813..69b51401df 100644 --- a/install/update.php +++ b/install/update.php @@ -139,6 +139,9 @@ if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once 'dist/lib/'.$di include_once 'dist/lib/'.$dist['id'].'.lib.php'; include_once 'dist/conf/'.$dist['confid'].'.conf.php'; +//** tRNG dependencies +$conf['tRNG']=''; + //** Get hostname exec('hostname -f', $tmp_out); $conf['hostname'] = $tmp_out[0]; @@ -407,9 +410,7 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel } elseif($conf['bind']['installed'] == true) { swriteln('Configuring BIND'); $inst->configure_bind(); - if(!is_installed('haveged')) { - swriteln("[INFO] haveged not detected - DNSSEC can fail"); - } + $conf['tRNG'] .= 'DNSSEC with BIND, '; } else { swriteln('Configuring MyDNS'); $inst->configure_mydns(); @@ -570,6 +571,9 @@ if($reconfigure_services_answer == 'yes') { //* Set default servers setDefaultServers(); +//* test tRNG +if($conf['tRNG']) tRNG(); + $inst->create_mount_script(); //* Create md5 filelist -- GitLab From 3e0ff3b57e887dba68d0c2d4fc826408d71c1435 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Feb 2017 20:58:15 -0600 Subject: [PATCH 107/302] tRNG test a little improved --- install/lib/install.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index a5b1815210..1893e75980 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -950,12 +950,12 @@ function getapachemodules() { function tRNG(){ global $conf; - $path='/dev/random';$test='/tmp/ispconfig.tRNG';$time=8;$warn=8192; - echo "Testing $time seconds throughput of $path ..."; + $path='/dev/random';$test='/tmp/ispconfig.tRNG';$time=2;$warn=8192; + echo "Testing $time seconds throughput of $path ... "; exec("cat $path > $test & PID=\$!; sleep $time; kill \$PID"); if(($result=filesize($test)) < $warn) { - echo "\n[WARN] these services may fail: {$conf['tRNG']}result: $result bytes, minimum recommended: $warn\n"; - }else echo " OK\n"; + echo "$result bytes\n[WARN] these services may fail: {$conf['tRNG']}minimum recommended: $warn\n"; + }else echo " $result bytes: OK\n"; unlink($test); } ?> -- GitLab From 03eda7f7e0bdc0e84afe0e33ca3dab9943b721c6 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Feb 2017 21:52:05 -0600 Subject: [PATCH 108/302] improved tRNG test --- install/lib/install.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 1893e75980..c58ca51ef8 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -955,7 +955,7 @@ function tRNG(){ exec("cat $path > $test & PID=\$!; sleep $time; kill \$PID"); if(($result=filesize($test)) < $warn) { echo "$result bytes\n[WARN] these services may fail: {$conf['tRNG']}minimum recommended: $warn\n"; - }else echo " $result bytes: OK\n"; + }else echo "$result bytes OK\n"; unlink($test); } ?> -- GitLab From d9d1e57901e087c2e53de6c9f9e4ac6125c4a0e7 Mon Sep 17 00:00:00 2001 From: CupOfTea696 Date: Sun, 5 Feb 2017 17:45:23 +0000 Subject: [PATCH 109/302] [DNS] Allow free standing @ as hostname --- interface/web/dns/form/dns_a.tform.php | 2 +- interface/web/dns/form/dns_aaaa.tform.php | 2 +- interface/web/dns/form/dns_mx.tform.php | 2 +- interface/web/dns/form/dns_txt.tform.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/dns/form/dns_a.tform.php b/interface/web/dns/form/dns_a.tform.php index d9ed197c51..49f26d2fd7 100644 --- a/interface/web/dns/form/dns_a.tform.php +++ b/interface/web/dns/form/dns_a.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,64}$/', + 'regex' => '/^([a-zA-Z0-9\.\-\*]{0,64}|@)$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_aaaa.tform.php b/interface/web/dns/form/dns_aaaa.tform.php index 018657b838..7e61c5bae9 100644 --- a/interface/web/dns/form/dns_aaaa.tform.php +++ b/interface/web/dns/form/dns_aaaa.tform.php @@ -79,7 +79,7 @@ $form["tabs"]['dns'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,64}$/', + 'regex' => '/^([a-zA-Z0-9\.\-\*]{0,64}|@)$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_mx.tform.php b/interface/web/dns/form/dns_mx.tform.php index 9aace37ae7..94436400d5 100644 --- a/interface/web/dns/form/dns_mx.tform.php +++ b/interface/web/dns/form/dns_mx.tform.php @@ -87,7 +87,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,255}$/', + 'regex' => '/^([a-zA-Z0-9\.\-\*]{0,255}|@)$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', diff --git a/interface/web/dns/form/dns_txt.tform.php b/interface/web/dns/form/dns_txt.tform.php index 01b731a2e4..d181f0c63d 100644 --- a/interface/web/dns/form/dns_txt.tform.php +++ b/interface/web/dns/form/dns_txt.tform.php @@ -86,7 +86,7 @@ $form["tabs"]['dns'] = array ( 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}$/', + 'regex' => '/^([a-zA-Z0-9\.\-\_]{0,255}|@)$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', -- GitLab From cc268539ff451351dab8b0e55afb312ed8b4c2ed Mon Sep 17 00:00:00 2001 From: Oliver Gmelch Date: Tue, 7 Feb 2017 22:51:55 +0100 Subject: [PATCH 110/302] Enhancements on German translation files --- .../mail/lib/lang/de_backup_stats_list.lng | 2 +- interface/web/mail/lib/lang/de_mail_alias.lng | 2 +- .../web/mail/lib/lang/de_mail_backup_list.lng | 28 +++++++++---------- interface/web/mail/lib/lang/de_mail_user.lng | 20 ++++++------- .../web/mail/lib/lang/de_mail_user_list.lng | 6 ++-- interface/web/sites/lib/lang/de.lng | 5 +++- .../lib/lang/de_database_quota_stats_list.lng | 2 +- .../lib/lang/de_ftp_sites_stats_list.lng | 12 ++++---- .../web/sites/lib/lang/de_shell_user.lng | 10 +++---- .../lib/lang/de_web_childdomain_list.lng | 4 +-- .../web/sites/lib/lang/de_web_subdomain.lng | 4 +-- .../sites/lib/lang/de_web_vhost_domain.lng | 12 ++++---- 12 files changed, 55 insertions(+), 52 deletions(-) diff --git a/interface/web/mail/lib/lang/de_backup_stats_list.lng b/interface/web/mail/lib/lang/de_backup_stats_list.lng index 9e14533068..9147d3cbd6 100644 --- a/interface/web/mail/lib/lang/de_backup_stats_list.lng +++ b/interface/web/mail/lib/lang/de_backup_stats_list.lng @@ -5,5 +5,5 @@ $wb['domain_txt'] = 'Email'; $wb['backup_count_txt'] = 'Anz. Backups'; $wb['backup_server_txt'] = 'Server'; $wb['backup_interval_txt'] = 'Intervall / Anz.'; -$wb['backup_size_txt'] = 'Backupgrösse'; +$wb['backup_size_txt'] = 'Backupgröße'; ?> diff --git a/interface/web/mail/lib/lang/de_mail_alias.lng b/interface/web/mail/lib/lang/de_mail_alias.lng index 211f0065fa..4cdcd03a6f 100644 --- a/interface/web/mail/lib/lang/de_mail_alias.lng +++ b/interface/web/mail/lib/lang/de_mail_alias.lng @@ -12,6 +12,6 @@ $wb['domain_txt'] = 'Domain'; $wb['duplicate_email_alias_txt'] = 'Dieser E-Mail Alias existiert bereits.'; $wb['source_txt'] = 'Alias'; $wb['send_as_txt'] = 'Senden als'; -$wb['send_as_exp'] = 'Ziel erlauben, den alias als Absender zu benutzen'; +$wb['send_as_exp'] = 'Ziel erlauben, den Alias als Absender zu benutzen'; $wb['greylisting_txt'] = 'Aktiviere Greylisting'; ?> diff --git a/interface/web/mail/lib/lang/de_mail_backup_list.lng b/interface/web/mail/lib/lang/de_mail_backup_list.lng index 73286a0737..3c3ee4d315 100644 --- a/interface/web/mail/lib/lang/de_mail_backup_list.lng +++ b/interface/web/mail/lib/lang/de_mail_backup_list.lng @@ -1,16 +1,16 @@ diff --git a/interface/web/mail/lib/lang/de_mail_user.lng b/interface/web/mail/lib/lang/de_mail_user.lng index 88419bf5ab..29be426331 100644 --- a/interface/web/mail/lib/lang/de_mail_user.lng +++ b/interface/web/mail/lib/lang/de_mail_user.lng @@ -37,8 +37,8 @@ $wb['move_junk_txt'] = 'Spam E-Mails in das Junk Verzeichnis verschieben'; $wb['name_txt'] = 'Name'; $wb['name_optional_txt'] = '(optional)'; $wb['autoresponder_active'] = 'Autoresponder aktivieren'; -$wb['cc_txt'] = 'Kopie senden an'; -$wb['cc_error_isemail'] = 'Das -Kopie senden an- Feld enthält keine gültige E-Mail Adresse'; +$wb['cc_txt'] = 'Eingehende Mails in Kopie senden an'; +$wb['cc_error_isemail'] = 'Das Feld "Kopie senden an" enthält keine gültige E-Mail Adresse'; $wb['login_error_unique'] = 'Benutzername wird bereits verwendet.'; $wb['login_error_regex'] = 'Zulässige Zeichen sind A-Z, a-z, 0-9, ., _ und -.'; $wb['login_txt'] = 'Anmelden'; @@ -50,16 +50,16 @@ $wb['repeat_password_txt'] = 'Passwort wiederholen'; $wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.'; $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; $wb['email_error_isascii'] = 'Bitte verwenden Sie keine Umlaute im Passwort. Dies kann zu Problemen mit Ihrem E-Mail-Programm führen.'; -$wb['backup_interval_txt'] = 'Backup interval'; +$wb['backup_interval_txt'] = 'Backup-Intervall'; $wb['backup_copies_txt'] = 'Anzahl der Backups'; $wb['no_backup_txt'] = 'inaktiv'; -$wb['daily_backup_txt'] = 'taeglich'; -$wb['weekly_backup_txt'] = 'woechentlich'; +$wb['daily_backup_txt'] = 'täglich'; +$wb['weekly_backup_txt'] = 'wöchentlich'; $wb['monthly_backup_txt'] = 'monatlich'; $wb['cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)'; -$wb['autoresponder_start_date_is_required'] = 'Start date must be set when Autoresponder is enabled.'; -$wb['sender_cc_txt'] = 'Send outgoing copy to'; -$wb['sender_cc_error_isemail'] = 'The -Send outgoing copy to- field does not contain a valid email address'; -$wb['sender_cc_note_txt'] = '(Separate multiple email addresses with commas)'; -$wb['password_click_to_set_txt'] = 'Click to set'; +$wb['autoresponder_start_date_is_required'] = 'Das Startdatum muss angegeben werden, um den Autoresponder zu aktivieren.'; +$wb['sender_cc_txt'] = 'Ausgehende Mails in BCC senden an'; +$wb['sender_cc_error_isemail'] = 'Das Feld "Ausgehende Mails in BCC senden an" enthält keine gültige E-Mail-Adresse.'; +$wb['sender_cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)'; +$wb['password_click_to_set_txt'] = 'Passwort erzeugen'; ?> diff --git a/interface/web/mail/lib/lang/de_mail_user_list.lng b/interface/web/mail/lib/lang/de_mail_user_list.lng index 5eeff280c2..1c6e40e3cf 100644 --- a/interface/web/mail/lib/lang/de_mail_user_list.lng +++ b/interface/web/mail/lib/lang/de_mail_user_list.lng @@ -3,10 +3,10 @@ $wb['list_head_txt'] = 'E-Mail Konto'; $wb['email_txt'] = 'E-Mail Adresse'; $wb['autoresponder_txt'] = 'Autoresponder'; $wb['add_new_record_txt'] = 'Neues E-Mail Konto hinzufügen'; -$wb['name_txt'] = 'Realname'; +$wb['name_txt'] = 'Name'; $wb['login_txt'] = 'Anmelden'; -$wb['postfix_txt'] = 'Receiving'; -$wb['disablesmtp_txt'] = 'SMTP (sending)'; +$wb['postfix_txt'] = 'Empfang'; +$wb['disablesmtp_txt'] = 'SMTP (Versand)'; $wb['disableimap_txt'] = 'IMAP'; $wb['disablepop3_txt'] = 'POP3'; ?> diff --git a/interface/web/sites/lib/lang/de.lng b/interface/web/sites/lib/lang/de.lng index 48e0a9a9a7..f5cf2e2052 100644 --- a/interface/web/sites/lib/lang/de.lng +++ b/interface/web/sites/lib/lang/de.lng @@ -14,7 +14,7 @@ $wb['Command Line'] = 'Kommandozeile'; $wb['Shell-User'] = 'Shell Benutzer'; $wb['Cron Jobs'] = 'Cronjobs'; $wb['Statistics'] = 'Statistik'; -$wb['Web traffic'] = 'Datentransfer'; +$wb['Web traffic'] = 'Web-Datentransfer'; $wb['Website quota (Harddisk)'] = 'Speicherplatzbeschränkung'; $wb['Cron'] = 'Cron'; $wb['Stats'] = 'Statistiken'; @@ -32,4 +32,7 @@ $wb['Installed packages'] = 'Installierte Pakete'; $wb['Update Packagelist'] = 'Paketliste aktualisieren'; $wb['error_proxy_requires_url'] = 'Weiterleitungstyp '; $wb['Subdomain (Vhost)'] = 'Subdomain (vHost)'; +$wb['Database quota'] = 'Datenbank-Quota'; +$wb['FTP traffic'] = 'FTP-Datentransfer'; +$wb['Backup Stats'] = 'Backup-Statistiken'; ?> diff --git a/interface/web/sites/lib/lang/de_database_quota_stats_list.lng b/interface/web/sites/lib/lang/de_database_quota_stats_list.lng index 3bc9874bf1..087756104a 100644 --- a/interface/web/sites/lib/lang/de_database_quota_stats_list.lng +++ b/interface/web/sites/lib/lang/de_database_quota_stats_list.lng @@ -5,5 +5,5 @@ $wb['client_txt'] = 'Kunde'; $wb['used_txt'] = 'Verwendeter Speicherplatz'; $wb['quota_txt'] = 'Quota'; $wb['percentage_txt'] = 'Verbraucht in %'; -$wb['list_head_txt'] = 'Database Quota'; +$wb['list_head_txt'] = 'Datenbank-Quota'; ?> diff --git a/interface/web/sites/lib/lang/de_ftp_sites_stats_list.lng b/interface/web/sites/lib/lang/de_ftp_sites_stats_list.lng index e44025a715..c2df2b397c 100644 --- a/interface/web/sites/lib/lang/de_ftp_sites_stats_list.lng +++ b/interface/web/sites/lib/lang/de_ftp_sites_stats_list.lng @@ -1,10 +1,10 @@ diff --git a/interface/web/sites/lib/lang/de_shell_user.lng b/interface/web/sites/lib/lang/de_shell_user.lng index 9130b456e3..6b5dac53c3 100644 --- a/interface/web/sites/lib/lang/de_shell_user.lng +++ b/interface/web/sites/lib/lang/de_shell_user.lng @@ -28,9 +28,9 @@ $wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.'; $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; $wb['username_must_not_exceed_32_chars_txt'] = 'Der Benutzername darf 32 Zeichen nicht überschreiten.'; $wb['username_not_allowed_txt'] = 'Dieser Benutzername ist nicht erlaubt.'; -$wb['invalid_system_user_or_group_txt'] = 'Invalid system user or group'; -$wb['directory_error_regex'] = 'Invalid directory'; -$wb['shell_error_regex'] = 'Invalid shell'; -$wb['invalid_username_txt'] = 'Invalid Username'; -$wb['directory_error_notinweb'] = 'The directory has to be inside the web root.'; +$wb['invalid_system_user_or_group_txt'] = 'Ungültiger Web Benutzername oder Gruppe'; +$wb['directory_error_regex'] = 'Ungültiges Verzeichnis'; +$wb['shell_error_regex'] = 'Ungültige Shell'; +$wb['invalid_username_txt'] = 'Ungültiger Benutzername'; +$wb['directory_error_notinweb'] = 'Das Verzeichnis muss innerhalb des Web-Verzeichnisses liegen.'; ?> diff --git a/interface/web/sites/lib/lang/de_web_childdomain_list.lng b/interface/web/sites/lib/lang/de_web_childdomain_list.lng index 275b09080c..136a3d70ad 100644 --- a/interface/web/sites/lib/lang/de_web_childdomain_list.lng +++ b/interface/web/sites/lib/lang/de_web_childdomain_list.lng @@ -10,8 +10,8 @@ $wb['domain_error_regex'] = 'Domain Name ist ungültig.'; $wb['no_redirect_txt'] = 'Keine Weiterleitung'; $wb['no_flag_txt'] = 'Keine Optionen'; $wb['none_txt'] = 'Keine'; -$wb['add_new_subdomain_txt'] = 'Add new Subdomain'; -$wb['add_new_aliasdomain_txt'] = 'Add new Aliasdomain'; +$wb['add_new_subdomain_txt'] = 'Neue Subdomain hinzufügen'; +$wb['add_new_aliasdomain_txt'] = 'Neue Aliasdomain hinzufügen'; $wb['aliasdomain_list_head_txt'] = 'Aliasdomains'; $wb['subdomain_list_head_txt'] = 'Subdomains'; ?> diff --git a/interface/web/sites/lib/lang/de_web_subdomain.lng b/interface/web/sites/lib/lang/de_web_subdomain.lng index 586c90adc3..4f34874a11 100644 --- a/interface/web/sites/lib/lang/de_web_subdomain.lng +++ b/interface/web/sites/lib/lang/de_web_subdomain.lng @@ -45,6 +45,6 @@ $wb['available_proxy_directive_snippets_txt'] = 'Verfügbare Proxy Direktiven Sc $wb['error_proxy_requires_url'] = 'Weiterleitungstyp \\"proxy\\" erfordert eine URL als Weiterleitungspfad.'; $wb['http_port_txt'] = 'HTTP Port'; $wb['https_port_txt'] = 'HTTPS Port'; -$wb['http_port_error_regex'] = 'HTTP Port invalid.'; -$wb['https_port_error_regex'] = 'HTTPS Port invalid.'; +$wb['http_port_error_regex'] = 'HTTP Port ungültig.'; +$wb['https_port_error_regex'] = 'HTTPS Port ungültig.'; ?> diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng index 5a73247189..85f88d33af 100644 --- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng @@ -138,14 +138,14 @@ $wb['enable_spdy_txt'] = 'Aktiviere SPDY'; $wb['load_client_data_txt'] = 'Kundendaten übernehmen'; $wb['load_my_data_txt'] = 'Meine Kontaktdaten laden'; $wb['reset_client_data_txt'] = 'Daten verwerfen'; -$wb['server_chosen_not_ok'] = 'The selected server is not allowed for this account.'; -$wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.'; -$wb['rewrite_to_https_txt'] = 'Rewrite HTTP to HTTPS'; -$wb['password_strength_txt'] = 'Password strength'; +$wb['server_chosen_not_ok'] = 'Der ausgewählte Server ist nicht zulässig für diesen Account.'; +$wb['subdomain_error_empty'] = 'Die Subdomain ist leer oder ungültig.'; +$wb['rewrite_to_https_txt'] = 'HTTP zu HTTPS weiterleiten'; +$wb['password_strength_txt'] = 'Passwortstärke'; $wb['directive_snippets_id_txt'] = 'Webserver-Konfiguration'; $wb['http_port_txt'] = 'HTTP Port'; $wb['https_port_txt'] = 'HTTPS Port'; -$wb['http_port_error_regex'] = 'HTTP Port invalid.'; -$wb['https_port_error_regex'] = 'HTTPS Port invalid.'; +$wb['http_port_error_regex'] = 'HTTP Port ungültig.'; +$wb['https_port_error_regex'] = 'HTTPS Port ungültig.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; ?> -- GitLab From eff34203b2255b4cf728e91b929e7f41c44afb54 Mon Sep 17 00:00:00 2001 From: Christiaan de Die le Clercq Date: Thu, 9 Feb 2017 13:18:48 +0100 Subject: [PATCH 111/302] Update en_mail_user_autoresponder.lng to have "Subject" instead of "Betreff" in English translation --- interface/web/mailuser/lib/lang/en_mail_user_autoresponder.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mailuser/lib/lang/en_mail_user_autoresponder.lng b/interface/web/mailuser/lib/lang/en_mail_user_autoresponder.lng index a736abf690..e002815943 100644 --- a/interface/web/mailuser/lib/lang/en_mail_user_autoresponder.lng +++ b/interface/web/mailuser/lib/lang/en_mail_user_autoresponder.lng @@ -9,5 +9,5 @@ $wb["autoresponder_end_date_txt"] = 'End by'; $wb["autoresponder_end_date_isgreater"] = 'End date must be set and be later than start date.'; $wb['autoresponder_active'] = 'Enable the autoresponder'; $wb['now_txt']='Now'; -$wb['autoresponder_subject_txt'] = 'Betreff'; +$wb['autoresponder_subject_txt'] = 'Subject'; ?> -- GitLab From 3df3ff8a9122fe843df3b97f13c53342769789e8 Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Sat, 11 Feb 2017 18:17:20 +0100 Subject: [PATCH 112/302] allow wildcard for jailkit copy --- interface/web/admin/form/server_config.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index de5904ebcb..6eb03aa092 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -1599,7 +1599,7 @@ $form["tabs"]['jailkit'] = array( 'validators' => array( 0 => array('type' => 'NOTEMPTY', 'errmsg' => 'jailkit_chroot_app_programs_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[a-zA-Z0-9\.\-\_\/\ ]{1,}$/', + 'regex' => '/^[a-zA-Z0-9\*\.\-\_\/\ ]{1,}$/', 'errmsg'=> 'jailkit_chroot_app_programs_error_regex'), ), 'value' => '', -- GitLab From 9c71cc0ef813ea7be4557842532f0c0f3590a0a5 Mon Sep 17 00:00:00 2001 From: Oliver Gmelch Date: Wed, 15 Feb 2017 19:04:06 +0100 Subject: [PATCH 113/302] resolves ticket #4484 - introduces translations for login_as --- interface/web/login/lib/lang/de_login_as.lng | 4 +++- interface/web/login/lib/lang/en_login_as.lng | 2 ++ interface/web/login/logout.php | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/interface/web/login/lib/lang/de_login_as.lng b/interface/web/login/lib/lang/de_login_as.lng index 4baa195d3a..131ff5fa3c 100644 --- a/interface/web/login/lib/lang/de_login_as.lng +++ b/interface/web/login/lib/lang/de_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'Es gibt bereits einen Firewalleintrag für diese $wb['tcp_ports_error_regex'] = 'Es sind nur Zahlen in der TCP Port Definition erlaubt. '; $wb['udp_ports_error_regex'] = 'Es sind nur Zahlen in der UDP Port Definition erlaubt., '; $wb['login_as_or_logout_txt'] = 'Wollen Sie sich wieder als {UTYPE} anmelden oder sich abmelden?'; -?> +$wb['btn_reloginas_txt'] = 'Ja, erneut als %s anmelden'; +$wb['btn_nologout_txt'] = 'Nein, abmelden'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/en_login_as.lng b/interface/web/login/lib/lang/en_login_as.lng index d1f98c8806..c849db3d04 100644 --- a/interface/web/login/lib/lang/en_login_as.lng +++ b/interface/web/login/lib/lang/en_login_as.lng @@ -10,4 +10,6 @@ $wb["active_txt"] = 'Active'; $wb["tcp_ports_error_regex"] = 'Character not allowed in tcp port definition. Allowed characters are numbers, ":" and ",".'; $wb["udp_ports_error_regex"] = 'Character not allowed in udp port definition. Allowed characters are numbers, ":" and ",".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; ?> \ No newline at end of file diff --git a/interface/web/login/logout.php b/interface/web/login/logout.php index a4a127ff8b..db5f3adbcc 100644 --- a/interface/web/login/logout.php +++ b/interface/web/login/logout.php @@ -56,8 +56,8 @@ if ((isset($_SESSION['s_old']) && ($_SESSION['s_old']['user']['typ'] == 'admin'
- - + +
'; exit; @@ -84,4 +84,4 @@ if($_SESSION["s"]["site"]["logout"] != '') { $_SESSION = array(); session_destroy(); session_write_close(); -?> +?> \ No newline at end of file -- GitLab From 8103d32749295d1b588f1cfa929e5657f6914648 Mon Sep 17 00:00:00 2001 From: Oliver Gmelch Date: Wed, 15 Feb 2017 19:14:31 +0100 Subject: [PATCH 114/302] resolves ticket #4484 - adds default translation for missing languages --- interface/web/login/lib/lang/ar_login_as.lng | 4 +++- interface/web/login/lib/lang/bg_login_as.lng | 4 +++- interface/web/login/lib/lang/br_login_as.lng | 4 +++- interface/web/login/lib/lang/ca_login_as.lng | 4 +++- interface/web/login/lib/lang/cz_login_as.lng | 4 +++- interface/web/login/lib/lang/dk_login_as.lng | 4 +++- interface/web/login/lib/lang/el_login_as.lng | 4 +++- interface/web/login/lib/lang/es_login_as.lng | 4 +++- interface/web/login/lib/lang/fi_login_as.lng | 4 +++- interface/web/login/lib/lang/fr_login_as.lng | 4 +++- interface/web/login/lib/lang/hr_login_as.lng | 4 +++- interface/web/login/lib/lang/hu_login_as.lng | 4 +++- interface/web/login/lib/lang/id_login_as.lng | 4 +++- interface/web/login/lib/lang/it_login_as.lng | 4 +++- interface/web/login/lib/lang/ja_login_as.lng | 4 +++- interface/web/login/lib/lang/nl_login_as.lng | 4 +++- interface/web/login/lib/lang/pl_login_as.lng | 4 +++- interface/web/login/lib/lang/pt_login_as.lng | 4 +++- interface/web/login/lib/lang/ro_login_as.lng | 4 +++- interface/web/login/lib/lang/ru_login_as.lng | 4 +++- interface/web/login/lib/lang/se_login_as.lng | 4 +++- interface/web/login/lib/lang/sk_login_as.lng | 4 +++- interface/web/login/lib/lang/tr_login_as.lng | 4 +++- 23 files changed, 69 insertions(+), 23 deletions(-) diff --git a/interface/web/login/lib/lang/ar_login_as.lng b/interface/web/login/lib/lang/ar_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/ar_login_as.lng +++ b/interface/web/login/lib/lang/ar_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/bg_login_as.lng b/interface/web/login/lib/lang/bg_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/bg_login_as.lng +++ b/interface/web/login/lib/lang/bg_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/br_login_as.lng b/interface/web/login/lib/lang/br_login_as.lng index 24a2fa2f7e..f7ef7d8a1d 100644 --- a/interface/web/login/lib/lang/br_login_as.lng +++ b/interface/web/login/lib/lang/br_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'Já existe um registro de firewall igual para es $wb['tcp_ports_error_regex'] = 'Caractere não permitido para atribuição numa porta TCP. Caracteres permitidos são: números, \\":\\" e \\",\\".'; $wb['udp_ports_error_regex'] = 'Caractere não permitido para atribuição numa porta UDP. Caracteres permitidos são: números, \\":\\" e \\",\\".'; $wb['login_as_or_logout_txt'] = 'Você deseja acessar novamente como {UTYPE} ou sair?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/ca_login_as.lng b/interface/web/login/lib/lang/ca_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/ca_login_as.lng +++ b/interface/web/login/lib/lang/ca_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/cz_login_as.lng b/interface/web/login/lib/lang/cz_login_as.lng index 53629ac2a5..9c0e7368f7 100644 --- a/interface/web/login/lib/lang/cz_login_as.lng +++ b/interface/web/login/lib/lang/cz_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'Pro tento server již existuje záznam firewallu $wb['tcp_ports_error_regex'] = 'Znak není povole v definici TCP portu. Povolené symboly jsou čísla, : a ,.'; $wb['udp_ports_error_regex'] = 'Znak není povole v definici UDP portu. Povolené symboly jsou čísla, : a ,.'; $wb['login_as_or_logout_txt'] = 'Chcete se znovu přihlásit jako uživatel {UTYPE} nebo se chcete odhlásit ?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/dk_login_as.lng b/interface/web/login/lib/lang/dk_login_as.lng index bebcf165a7..83dcf39c63 100644 --- a/interface/web/login/lib/lang/dk_login_as.lng +++ b/interface/web/login/lib/lang/dk_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'Der er allerede en firewall post for denne serve $wb['tcp_ports_error_regex'] = 'Tegn ikke tilladt i TCP port definition. Tilladt tegn er tal, \\":\\" og \\",\\".'; $wb['udp_ports_error_regex'] = 'Tegn ikke tilladt i UDP port definition. Tilladt tegn er tal, \\":\\" og \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/el_login_as.lng b/interface/web/login/lib/lang/el_login_as.lng index 435d3e9a69..060b91aa84 100644 --- a/interface/web/login/lib/lang/el_login_as.lng +++ b/interface/web/login/lib/lang/el_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'Υπάρχει ήδη μια εγγραφή Fire $wb['tcp_ports_error_regex'] = 'Μη έγκυρος χαρακτήρας για τον ορισμός θύρας tcp. Επιτρεπόμενοι χαρακτήρες είναι οι αριθμοί, η \\":\\" και οι \\",\\".'; $wb['udp_ports_error_regex'] = 'Μη έγκυρος χαρακτήρας για τον ορισμός θύρας udp. Επιτρεπόμενοι χαρακτήρες είναι οι αριθμοί, η \\":\\" και οι \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/es_login_as.lng b/interface/web/login/lib/lang/es_login_as.lng index b7f3e21f98..2abb6cf906 100755 --- a/interface/web/login/lib/lang/es_login_as.lng +++ b/interface/web/login/lib/lang/es_login_as.lng @@ -9,4 +9,6 @@ $wb['tcp_ports_error_regex'] = 'Caracteres no permitidos en la definición de pu $wb['udp_port_help_txt'] = 'Separado por comas'; $wb['udp_ports_error_regex'] = 'Caracteres no permitidos en la definición de puertos udp. Los caracteres permitidos son: números, \\":\\" y \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/fi_login_as.lng b/interface/web/login/lib/lang/fi_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/fi_login_as.lng +++ b/interface/web/login/lib/lang/fi_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/fr_login_as.lng b/interface/web/login/lib/lang/fr_login_as.lng index 55c9f6df5b..612246a33c 100644 --- a/interface/web/login/lib/lang/fr_login_as.lng +++ b/interface/web/login/lib/lang/fr_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Caractère non autorisé dans la règle de port TCP. Les caractères autorisés sont : les chiffres, « : » et « , ».'; $wb['udp_ports_error_regex'] = 'Caractère non autorisé dans la règle de port UDP. Les caractères autorisés sont : les chiffres, « : » et « , ».'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/hr_login_as.lng b/interface/web/login/lib/lang/hr_login_as.lng index bcd13040d3..e1fe01edc1 100644 --- a/interface/web/login/lib/lang/hr_login_as.lng +++ b/interface/web/login/lib/lang/hr_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/hu_login_as.lng b/interface/web/login/lib/lang/hu_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/hu_login_as.lng +++ b/interface/web/login/lib/lang/hu_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/id_login_as.lng b/interface/web/login/lib/lang/id_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/id_login_as.lng +++ b/interface/web/login/lib/lang/id_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/it_login_as.lng b/interface/web/login/lib/lang/it_login_as.lng index 3fa23da274..97cc9f8fde 100644 --- a/interface/web/login/lib/lang/it_login_as.lng +++ b/interface/web/login/lib/lang/it_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'Esiste già un record firewall per questo server $wb['tcp_ports_error_regex'] = 'Caratteri non autorizzati nella definizine di porta tcp. Sono consentiti caratteri numerici, \\":\\" e \\",\\".'; $wb['udp_ports_error_regex'] = 'Caratteri non autorizzati nella definizine di porta udp. ono consentiti caratteri numerici, \\":\\" e \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/ja_login_as.lng b/interface/web/login/lib/lang/ja_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/ja_login_as.lng +++ b/interface/web/login/lib/lang/ja_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/nl_login_as.lng b/interface/web/login/lib/lang/nl_login_as.lng index d4d2715e7a..1952618e0e 100644 --- a/interface/web/login/lib/lang/nl_login_as.lng +++ b/interface/web/login/lib/lang/nl_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/pl_login_as.lng b/interface/web/login/lib/lang/pl_login_as.lng index fd673484d7..55683a80b0 100644 --- a/interface/web/login/lib/lang/pl_login_as.lng +++ b/interface/web/login/lib/lang/pl_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'Istnieje już wpis firewalla dla tego serwera.'; $wb['tcp_ports_error_regex'] = 'Niedozwolony znam w definicji portu TCP. Dozwolone są liczby, dwukropek i przecinek (: i ,)'; $wb['udp_ports_error_regex'] = 'Niedozwolony znam w definicji portu UDP. Dozwolone są liczby, dwukropek i przecinek (: i ,)'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/pt_login_as.lng b/interface/web/login/lib/lang/pt_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/pt_login_as.lng +++ b/interface/web/login/lib/lang/pt_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/ro_login_as.lng b/interface/web/login/lib/lang/ro_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/ro_login_as.lng +++ b/interface/web/login/lib/lang/ro_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/ru_login_as.lng b/interface/web/login/lib/lang/ru_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/ru_login_as.lng +++ b/interface/web/login/lib/lang/ru_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/se_login_as.lng b/interface/web/login/lib/lang/se_login_as.lng index 17a82080dc..3ce5b9be41 100644 --- a/interface/web/login/lib/lang/se_login_as.lng +++ b/interface/web/login/lib/lang/se_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/sk_login_as.lng b/interface/web/login/lib/lang/sk_login_as.lng index cf75b54b47..cf9d01f16b 100644 --- a/interface/web/login/lib/lang/sk_login_as.lng +++ b/interface/web/login/lib/lang/sk_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'There is already a firewall record for this serv $wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file diff --git a/interface/web/login/lib/lang/tr_login_as.lng b/interface/web/login/lib/lang/tr_login_as.lng index f7f12feeff..7dc28e71c7 100644 --- a/interface/web/login/lib/lang/tr_login_as.lng +++ b/interface/web/login/lib/lang/tr_login_as.lng @@ -9,4 +9,6 @@ $wb['firewall_error_unique'] = 'Bu sunucu için bir güvenlik duvarı kaydı zat $wb['tcp_ports_error_regex'] = 'TCP kapı açıklamasında karakter kullanılamaz. Yalnız rakam, \\":\\" ve \\",\\" karakterleri kullanılabilir.'; $wb['udp_ports_error_regex'] = 'UDP kapı açıklamasında karakter kullanılamaz. Yalnız rakam, \\":\\" ve \\",\\" karakterleri kullanılabilir.'; $wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -?> +$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; +$wb['btn_nologout_txt'] = 'No, logout'; +?> \ No newline at end of file -- GitLab From 3dc4ef5f246a1ebe1e6f5647c18a143977faa6c8 Mon Sep 17 00:00:00 2001 From: Oliver Gmelch Date: Wed, 15 Feb 2017 19:36:32 +0100 Subject: [PATCH 115/302] resolves ticket #4525 - adds translations for error messages during domain edit --- interface/web/sites/lib/lang/ar_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/bg_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/br_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/ca_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/cz_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/de_web_vhost_domain.lng | 5 ++++- interface/web/sites/lib/lang/dk_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/el_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/en_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/es_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/fi_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/fr_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/hr_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/hu_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/id_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/it_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/ja_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/nl_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/pl_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/pt_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/ro_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/ru_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/se_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/sk_web_vhost_domain.lng | 4 ++++ interface/web/sites/lib/lang/tr_web_vhost_domain.lng | 4 ++++ interface/web/sites/web_vhost_domain_edit.php | 8 ++++---- 26 files changed, 104 insertions(+), 5 deletions(-) diff --git a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng index 94c79285a2..79027bbba7 100644 --- a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng index 227f59a2b9..28f0c90408 100644 --- a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng index d23d6e42f8..6d3bd81c91 100644 --- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'Porta HTTPS'; $wb['http_port_error_regex'] = 'Porta HTTP inválida.'; $wb['https_port_error_regex'] = 'Porta HTTPS inválida.'; $wb['enable_pagespeed_txt'] = 'Habilitar PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng index f556ac53ae..09f0e8a7ae 100644 --- a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng index 9904babdba..fc02c21bfd 100644 --- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng index 85f88d33af..309544b5d2 100644 --- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng @@ -147,5 +147,8 @@ $wb['http_port_txt'] = 'HTTP Port'; $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port ungültig.'; $wb['https_port_error_regex'] = 'HTTPS Port ungültig.'; -$wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'Die IP-Adresse kann nicht geändert werden. Bitte kontaktieren Sie Ihren Administrator, wenn Sie die IPv4-Adresse ändern möchten.'; +$wb['error_ipv6_change_forbidden'] = 'Die IP-Adresse kann nicht geändert werden. Bitte kontaktieren Sie Ihren Administrator, wenn Sie die IPv6-Adresse ändern möchten.'; +$wb['error_domain_change_forbidden'] = 'Der Domainname kann nicht geändert werden. Bitte kontaktieren Sie Ihren Administrator, wenn Sie den Domainnamen ändern möchten.'; +$wb['error_server_change_not_possible'] = 'Der Server kann nicht geändert werden.'; ?> diff --git a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng index f556ac53ae..09f0e8a7ae 100644 --- a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/el_web_vhost_domain.lng b/interface/web/sites/lib/lang/el_web_vhost_domain.lng index 667e0bb6ec..b44146c012 100644 --- a/interface/web/sites/lib/lang/el_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/el_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng index 23da049a95..30fc8c3028 100644 --- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng @@ -153,4 +153,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/es_web_vhost_domain.lng b/interface/web/sites/lib/lang/es_web_vhost_domain.lng index 8d890db4a4..1b2ec2b26a 100644 --- a/interface/web/sites/lib/lang/es_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/es_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng index 22b75c84af..64e7b5e690 100644 --- a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng index 9e88ec533f..e056a7a3cb 100644 --- a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng index eac61086d5..242dc4c2a7 100644 --- a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng index e7adff96e8..cee865698d 100644 --- a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/id_web_vhost_domain.lng b/interface/web/sites/lib/lang/id_web_vhost_domain.lng index b334c4f6a3..7c249474cf 100644 --- a/interface/web/sites/lib/lang/id_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/id_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/it_web_vhost_domain.lng b/interface/web/sites/lib/lang/it_web_vhost_domain.lng index 1b31e12c22..4370ae41e5 100644 --- a/interface/web/sites/lib/lang/it_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/it_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng index 6a68440cd6..7a8232c93b 100644 --- a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng index 9f384bb2f8..4745bd6339 100644 --- a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Poort'; $wb['http_port_error_regex'] = 'HTTP Poort niet correct.'; $wb['https_port_error_regex'] = 'HTTPS Poort niet correct.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng index e7556d430b..8cfdef206e 100644 --- a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng index 183d9d9094..4f7e11f754 100644 --- a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng index 0f26be9547..498254f18d 100644 --- a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng index a223e19603..46b7533657 100644 --- a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/se_web_vhost_domain.lng b/interface/web/sites/lib/lang/se_web_vhost_domain.lng index a43688f27e..d2158af120 100644 --- a/interface/web/sites/lib/lang/se_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/se_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng index d95787116a..10a95fd4cc 100644 --- a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng index 6bf33db68f..d4163bb2b5 100644 --- a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng @@ -148,4 +148,8 @@ $wb['https_port_txt'] = 'HTTPS Port'; $wb['http_port_error_regex'] = 'HTTP Port invalid.'; $wb['https_port_error_regex'] = 'HTTPS Port invalid.'; $wb['enable_pagespeed_txt'] = 'Enable PageSpeed'; +$wb['error_ipv4_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv4 address.'; +$wb['error_ipv6_change_forbidden'] = 'The IP cannot be changed. Please contact your administrator if you want to change the IPv6 address.'; +$wb['error_domain_change_forbidden'] = 'The domain name cannot be changed. Please contact your administrator if you want to change the domain name.'; +$wb['error_server_change_not_possible'] = 'The server cannot be changed.'; ?> diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index f5e28a0609..a9b5d252ce 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -1462,7 +1462,7 @@ class page_action extends tform_actions { $rec = $app->db->queryOneRecord("SELECT server_id from web_domain WHERE domain_id = ?", $this->id); if($rec['server_id'] != $this->dataRecord["server_id"]) { //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); + $app->tform->errorMessage .= $app->lng('error_server_change_not_possible'); $this->dataRecord["server_id"] = $rec['server_id']; } unset($rec); @@ -1473,17 +1473,17 @@ class page_action extends tform_actions { $rec = $app->db->queryOneRecord("SELECT sys_perm_group, domain, ip_address, ipv6_address from web_domain WHERE domain_id = ?", $this->id); if(isset($this->dataRecord["domain"]) && $rec['domain'] != $this->dataRecord["domain"] && !$app->tform->checkPerm($this->id, 'u')) { //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('The Domain can not be changed. Please ask your Administrator if you want to change the domain name.'); + $app->tform->errorMessage .= $app->lng('error_domain_change_forbidden'); $this->dataRecord["domain"] = $rec['domain']; } if(isset($this->dataRecord["ip_address"]) && $rec['ip_address'] != $this->dataRecord["ip_address"] && $rec['sys_perm_group'] != 'riud') { //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('The IP can not be changed. Please ask your Administrator if you want to change the IPv4-Address.'); + $app->tform->errorMessage .= $app->lng('error_ipv4_change_forbidden'); $this->dataRecord["ip_address"] = $rec['ip_address']; } if(isset($this->dataRecord["ipv6_address"]) && $rec['ipv6_address'] != $this->dataRecord["ipv6_address"] && $rec['sys_perm_group'] != 'riud') { //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('The IP can not be changed. Please ask your Administrator if you want to change the IPv6-Address.'); + $app->tform->errorMessage .= $app->lng('error_ipv6_change_forbidden'); $this->dataRecord["ipv6_address"] = $rec['ipv6_address']; } unset($rec); -- GitLab From 7837bf4e2d6c967f818e3977c734bfaff31cd98a Mon Sep 17 00:00:00 2001 From: Oliver Gmelch Date: Wed, 15 Feb 2017 19:54:14 +0100 Subject: [PATCH 116/302] resolves ticket #4526 - adds translations for global search box --- interface/web/themes/default/templates/main.tpl.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 0dde5f8014..8473e07bf2 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -47,9 +47,9 @@
- + - -- GitLab From a0cc785487efbbba90d75771d1ce4386bbff4eec Mon Sep 17 00:00:00 2001 From: Oliver Gmelch Date: Wed, 15 Feb 2017 20:07:30 +0100 Subject: [PATCH 117/302] resolves ticket #4527 - adds translations for datalog modal dialog close button --- interface/lib/app.inc.php | 1 + interface/lib/lang/ar.lng | 1 + interface/lib/lang/bg.lng | 1 + interface/lib/lang/br.lng | 1 + interface/lib/lang/ca.lng | 1 + interface/lib/lang/cz.lng | 1 + interface/lib/lang/de.lng | 1 + interface/lib/lang/dk.lng | 1 + interface/lib/lang/el.lng | 1 + interface/lib/lang/en.lng | 1 + interface/lib/lang/es.lng | 1 + interface/lib/lang/fi.lng | 1 + interface/lib/lang/fr.lng | 1 + interface/lib/lang/hr.lng | 1 + interface/lib/lang/hu.lng | 1 + interface/lib/lang/id.lng | 1 + interface/lib/lang/it.lng | 1 + interface/lib/lang/ja.lng | 1 + interface/lib/lang/nl.lng | 1 + interface/lib/lang/pl.lng | 1 + interface/lib/lang/pt.lng | 1 + interface/lib/lang/ro.lng | 1 + interface/lib/lang/ru.lng | 1 + interface/lib/lang/se.lng | 1 + interface/lib/lang/sk.lng | 1 + interface/lib/lang/tr.lng | 1 + interface/web/themes/default/templates/main.tpl.htm | 2 +- 27 files changed, 27 insertions(+), 1 deletion(-) diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php index edbba27c7c..48349aec0f 100755 --- a/interface/lib/app.inc.php +++ b/interface/lib/app.inc.php @@ -283,6 +283,7 @@ class app { $this->tpl->setVar('datalog_changes_end_txt', $this->lng('datalog_changes_end_txt')); $this->tpl->setVar('datalog_changes_count', $datalog['count']); $this->tpl->setLoop('datalog_changes', $datalog['entries']); + $this->tpl->setVar('datalog_changes_close_txt', $this->lng('datalog_changes_close_txt')); } else { $this->tpl->setVar('app_version', ''); } diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng index 25dd920831..749cff0707 100644 --- a/interface/lib/lang/ar.lng +++ b/interface/lib/lang/ar.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index ff1e39fe34..ec811f3c29 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng index 156a52ca19..0362403717 100644 --- a/interface/lib/lang/br.lng +++ b/interface/lib/lang/br.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/ca.lng b/interface/lib/lang/ca.lng index c39cd0db27..dc4ca57a82 100644 --- a/interface/lib/lang/ca.lng +++ b/interface/lib/lang/ca.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng index 259b66d913..b20e9358ec 100644 --- a/interface/lib/lang/cz.lng +++ b/interface/lib/lang/cz.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index 61551ceeab..f690a51c4c 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -158,4 +158,5 @@ $wb['security_check1_txt'] = 'Sicherheitsüberprüfung für:'; $wb['security_check2_txt'] = 'fehlgeschlagen.'; $wb['select_directive_snippet_txt'] = 'Direktiven Schnipsel'; $wb['select_master_directive_snippet_txt'] = 'Master Direktiven Schnipsel'; +$wb['datalog_changes_close_txt'] = 'Schließen'; ?> diff --git a/interface/lib/lang/dk.lng b/interface/lib/lang/dk.lng index 798d2ccd45..f9f2f1b4b1 100644 --- a/interface/lib/lang/dk.lng +++ b/interface/lib/lang/dk.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng index 382bf4a758..0c8ad1afa4 100644 --- a/interface/lib/lang/el.lng +++ b/interface/lib/lang/el.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index 408ef35600..a3b9a53ae1 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -162,4 +162,5 @@ $wb['security_check1_txt'] = 'Check for security permission:'; $wb['security_check2_txt'] = 'failed.'; $wb['select_directive_snippet_txt'] = 'Directive Snippets'; $wb['select_master_directive_snippet_txt'] = 'Master Directive Snippets'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> \ No newline at end of file diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng index 3b1bae0b46..506629c945 100644 --- a/interface/lib/lang/es.lng +++ b/interface/lib/lang/es.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng index d4c23ca777..4cec2fc37c 100755 --- a/interface/lib/lang/fi.lng +++ b/interface/lib/lang/fi.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index 3e9bfa8daa..aa1392db62 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng index 310371be47..e66a36c8c5 100644 --- a/interface/lib/lang/hr.lng +++ b/interface/lib/lang/hr.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng index dd4cce79b3..8f4e8761bf 100644 --- a/interface/lib/lang/hu.lng +++ b/interface/lib/lang/hu.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng index bd90fd5a1b..45447b4756 100644 --- a/interface/lib/lang/id.lng +++ b/interface/lib/lang/id.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng index 737c07ba6d..ec52bafd28 100644 --- a/interface/lib/lang/it.lng +++ b/interface/lib/lang/it.lng @@ -161,4 +161,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng index 2a56e77399..0946603c46 100644 --- a/interface/lib/lang/ja.lng +++ b/interface/lib/lang/ja.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng index 888f9c0200..0605e02a12 100644 --- a/interface/lib/lang/nl.lng +++ b/interface/lib/lang/nl.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng index b5b62c816d..b225430f15 100644 --- a/interface/lib/lang/pl.lng +++ b/interface/lib/lang/pl.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng index 7845520a5b..7f232a8e73 100644 --- a/interface/lib/lang/pt.lng +++ b/interface/lib/lang/pt.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng index 613f2377a1..6db08b7e1e 100644 --- a/interface/lib/lang/ro.lng +++ b/interface/lib/lang/ro.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng index 70d8b08e3f..4265dca805 100644 --- a/interface/lib/lang/ru.lng +++ b/interface/lib/lang/ru.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng index b6767144df..cd7d80e9c3 100644 --- a/interface/lib/lang/se.lng +++ b/interface/lib/lang/se.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng index 6b4ef7676f..a2c13805c6 100644 --- a/interface/lib/lang/sk.lng +++ b/interface/lib/lang/sk.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng index 115bc890bb..8e7b790b74 100644 --- a/interface/lib/lang/tr.lng +++ b/interface/lib/lang/tr.lng @@ -158,4 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_changes_close_txt'] = 'Close'; ?> diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 8473e07bf2..b19f708e5d 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -79,7 +79,7 @@
-- GitLab From c40761b314af1b0e1b9e67451d9e32e0fc87fb83 Mon Sep 17 00:00:00 2001 From: Oliver Gmelch Date: Thu, 16 Feb 2017 09:40:29 +0100 Subject: [PATCH 118/302] resolves ticket #4525 - adds translations for error messages during domain edit --- interface/web/sites/web_vhost_domain_edit.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index a9b5d252ce..17523d7717 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -1462,7 +1462,7 @@ class page_action extends tform_actions { $rec = $app->db->queryOneRecord("SELECT server_id from web_domain WHERE domain_id = ?", $this->id); if($rec['server_id'] != $this->dataRecord["server_id"]) { //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('error_server_change_not_possible'); + $app->tform->errorMessage .= $app->tform->lng('error_server_change_not_possible'); $this->dataRecord["server_id"] = $rec['server_id']; } unset($rec); @@ -1473,17 +1473,17 @@ class page_action extends tform_actions { $rec = $app->db->queryOneRecord("SELECT sys_perm_group, domain, ip_address, ipv6_address from web_domain WHERE domain_id = ?", $this->id); if(isset($this->dataRecord["domain"]) && $rec['domain'] != $this->dataRecord["domain"] && !$app->tform->checkPerm($this->id, 'u')) { //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('error_domain_change_forbidden'); + $app->tform->errorMessage .= $app->tform->lng('error_domain_change_forbidden'); $this->dataRecord["domain"] = $rec['domain']; } if(isset($this->dataRecord["ip_address"]) && $rec['ip_address'] != $this->dataRecord["ip_address"] && $rec['sys_perm_group'] != 'riud') { //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('error_ipv4_change_forbidden'); + $app->tform->errorMessage .= $app->tform->lng('error_ipv4_change_forbidden'); $this->dataRecord["ip_address"] = $rec['ip_address']; } if(isset($this->dataRecord["ipv6_address"]) && $rec['ipv6_address'] != $this->dataRecord["ipv6_address"] && $rec['sys_perm_group'] != 'riud') { //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('error_ipv6_change_forbidden'); + $app->tform->errorMessage .= $app->tform->lng('error_ipv6_change_forbidden'); $this->dataRecord["ipv6_address"] = $rec['ipv6_address']; } unset($rec); -- GitLab From bb41e4e4057c6a7cd3ada189d316e437a31f4d09 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 16 Feb 2017 11:36:32 +0100 Subject: [PATCH 119/302] Fixed error $this to $inst --- install/lib/update.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 6d2c5c8c14..603548ffd4 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -124,7 +124,7 @@ function updateDbAndIni() { global $inst, $conf; //* ensure no modes with errors for ENGINE=MyISAM - $this->db->query("SET sql_mode = ''"); + $inst->db->query("SET sql_mode = ''"); //* Update $conf array with values from the server.ini that shall be preserved $tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); -- GitLab From 52e900e78783d65258df5dc2515937b510db9078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LEVEILLE=20C=C3=A9dric?= Date: Mon, 20 Feb 2017 10:07:16 -0500 Subject: [PATCH 120/302] Fix User database permission for table ftp_traffic in multi servers setup --- install/lib/installer_base.lib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 244355fa5d..17ce86e8df 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -667,6 +667,14 @@ class installer_base { if(!$this->dbmaster->query($query, $value['db'] . '.dns_soa', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } + + $query = "GRANT SELECT, INSERT, UPDATE ON ?? TO ?@?"; + if ($verbose){ + echo $query ."\n"; + } + if(!$this->dbmaster->query($query, $value['db'] . '.ftp_traffic', $value['user'], $host)) { + $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); + } } -- GitLab From 6e3c7edd6d512a9f013e16c0f382e1b7136fe2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LEVEILLE=20C=C3=A9dric?= Date: Mon, 20 Feb 2017 11:51:22 -0500 Subject: [PATCH 121/302] Adding extra remote API functions --- interface/lib/classes/remote.d/dns.inc.php | 59 +++++++++++++++ interface/lib/classes/remote.d/mail.inc.php | 77 ++++++++++++++++++++ interface/lib/classes/remote.d/sites.inc.php | 57 +++++++++++++++ 3 files changed, 193 insertions(+) diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index b95e74f768..7ce5765894 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -882,6 +882,65 @@ class remoting_dns extends remoting { } } + // ---------------------------------------------------------------------------------------------------------------- + + //* Get record by name / Useful for Dynamic DNS + public function dns_a_get_by_name($session_id, $params) + { + global $app; + + if(!$this->checkPerm($session_id, 'dns_a_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if(!empty($params)) { + $zone = $app->functions->intval($params['zone']); + $name = $params['name']; + $sql = "SELECT id, zone, name, type, data, active FROM dns_rr WHERE zone = ? AND name = ? "; + $result = $app->db->queryOneRecord($sql,$zone,$name); + return $result; + + } + return false; + } + + // Get master zone by ispconfig client id + public function dns_zone_get_status_by_user($session_id, $client_id, $server_id) { + global $app; + if(!$this->checkPerm($session_id, 'dns_zone_get')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if (!empty($client_id)) { + $server_id = $app->functions->intval($server_id); + $client_id = $app->functions->intval($client_id); + $sql = "SELECT id, origin, d.active FROM dns_soa d INNER JOIN sys_user s on (d.sys_groupid = s.default_group) WHERE client_id = ? AND server_id = ? ORDER BY origin ASC"; + $result = $app->db->queryAllRecords($sql, $client_id, $server_id); + return $result; + } + return false; + } + + // Get slave zone by ispconfig client id + public function dnz_zone_get_slave_by_user($session_id, $client_id, $server_id){ + global $app; + if(!$this->checkPerm($session_id, 'dns_zone_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if (!empty($client_id)) { + $server_id = $app->functions->intval($server_id); + $client_id = $app->functions->intval($client_id); + $sql = "SELECT d.id, d.origin, d.ns, d.active FROM dns_slave d INNER JOIN sys_user s on (d.sys_groupid = s.default_group) WHERE client_id = ? AND server_id = ? ORDER BY origin ASC"; + $result = $app->db->queryAllRecords($sql, $client_id, $server_id); + return $result; + } + return false; + } + } ?> diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index bda7e861ed..1a6648a00d 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -1104,7 +1104,84 @@ class remoting_mail extends remoting { return $app->quota_lib->get_mailquota_data($client_id, false); } + + // ---------------------------------------------------------------------------------------------------------------- + + + // Get domain zone by ispconfig id + public function mail_domain_get_by_user($session_id, $client_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'mail_domain_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if (!empty($client_id)) { + $client_id = $app->functions->intval($client_id); + $sql = "SELECT domain_id, domain, m.active, m.server_id, svr.server_name FROM mail_domain m INNER JOIN sys_user s on(m.sys_groupid = s.default_group) INNER JOIN server AS svr ON (m.server_id = svr.server_id) WHERE client_id = ? ORDER BY domain ASC"; + $result = $app->db->queryAllRecords($sql, $client_id); + return $result; + } + return false; + } + + // Get email by ispconfig client id + public function mail_users_get_by_user($session_id, $client_id, $domain) + { + global $app; + + if(!$this->checkPerm($session_id, 'mail_user_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if (!empty($client_id)) { + $client_id = $app->functions->intval($client_id); + $sql = "SELECT mailuser_id, email, cc, quota, server_id, postfix as active FROM mail_user m INNER JOIN sys_user s on(m.sys_groupid = s.default_group) WHERE client_id = ? AND email LIKE ? ORDER BY email ASC"; + $result = $app->db->queryAllRecords($sql,$client_id, '%@'.$domain); + return $result; + } + return false; + } + // Get alias or forward by ispconfig client id + public function mail_fw_alias_get_by_user($session_id, $client_id, $domain) + { + global $app; + + if(!$this->checkPerm($session_id, 'mail_user_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if (!empty($client_id) ) { + $client_id = $app->functions->intval($client_id); + $sql = "SELECT forwarding_id, source, destination, type, m.active FROM mail_forwarding m INNER JOIN sys_user s on(m.sys_groupid = s.default_group) WHERE client_id = ? AND source LIKE ? ORDER BY type ASC, source ASC" ; + $result = $app->db->queryAllRecords($sql, $client_id, '%@'.$domain); + return $result; + } + return false; + } + + // Get email id by email + public function mail_user_get_by_email($session_id, $email) + { + global $app; + + if(!$this->checkPerm($session_id, 'mail_user_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if (!empty($email)) { + $sql = "SELECT mailuser_id FROM mail_user WHERE email = ?"; + $result = $app->db->queryOneRecord($sql, $email); + return $result["mailuser_id"]; + } + return false; + } } ?> diff --git a/interface/lib/classes/remote.d/sites.inc.php b/interface/lib/classes/remote.d/sites.inc.php index b5da5aa637..e689b0ca8c 100644 --- a/interface/lib/classes/remote.d/sites.inc.php +++ b/interface/lib/classes/remote.d/sites.inc.php @@ -1008,7 +1008,64 @@ class remoting_sites extends remoting { return $app->quota_lib->get_databasequota_data($client_id, false); } + // ---------------------------------------------------------------------------------------------------------------- + + // Get ftp user by ispconfig client id and site id + public function sites_web_ftp_get_by_id($session_id, $client_id, $parent_domain_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_ftp_user_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if (!empty($client_id) ) { + $client_id = $app->functions->intval($client_id); + $parent_domain_id = $app->functions->intval($parent_domain_id); + $sql = "SELECT ftp_user_id, f.username, f.active FROM ftp_user f INNER JOIN sys_user s on(f.sys_groupid = s.default_group) WHERE client_id = ? AND parent_domain_id = ? ORDER BY f.username ASC" ; + $result = $app->db->queryAllRecords($sql,$client_id, $parent_domain_id); + return $result; + } + return false; + } + // Get site by ispconfig client id + public function sites_web_domain_get_by_id($session_id, $client_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_web_domain_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + if (!empty($client_id) ) { + $client_id = $app->functions->intval($client_id); + $sql = "SELECT w.domain_id, w.domain, w.type, w.hd_quota, w.active, w.parent_domain_id, svr.server_name FROM web_domain w INNER JOIN sys_user AS s ON(w.sys_groupid = s.default_group) INNER JOIN server AS svr ON (w.server_id = svr.server_id) WHERE s.client_id = ? ORDER BY domain ASC" ; + $result = $app->db->queryAllRecords($sql,$client_id); + return $result; + } + return false; + } + + // Get id website by name + public function website_get_id_by_name($session_id, $params) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_web_domain_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + if(!empty($params)) { + $sql = "SELECT domain_id FROM web_domain WHERE domain = ?"; + $result = $app->db->queryOneRecord($sql, $params); + return $result; + + } + return false; + } } ?> -- GitLab From 4e5d3d1fe30dd837335942dd8ce0dbe9bf847504 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 21 Feb 2017 15:43:00 +0100 Subject: [PATCH 122/302] Let apache handle error document for php files that desn't exist and not fpm --- server/conf/vhost.conf.master | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 9faa2b1c7b..a303313d3a 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -339,12 +339,24 @@ - SetHandler php5-fcgi + + + SetHandler php5-fcgi + + + SetHandler php5-fcgi + - SetHandler php5-fcgi + + + SetHandler php5-fcgi + + + SetHandler php5-fcgi + Action php5-fcgi /php5-fcgi virtual @@ -361,7 +373,13 @@ #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ fcgi://127.0.0.1:/$1 - SetHandler "proxy:fcgi://127.0.0.1:" + + + SetHandler "proxy:fcgi://127.0.0.1:" + + + SetHandler "proxy:fcgi://127.0.0.1:" +
@@ -369,7 +387,13 @@ #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix://|fcgi://localhost//$1 - SetHandler "proxy:unix:|fcgi://localhost" + + + SetHandler "proxy:unix:|fcgi://localhost" + + + SetHandler "proxy:unix:|fcgi://localhost" +
-- GitLab From bd95906e6396ddecda1570f2ffdfb0d83095a629 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 21 Feb 2017 15:55:14 +0100 Subject: [PATCH 123/302] Update vhost.conf.master --- server/conf/vhost.conf.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index a303313d3a..dcfea49842 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -341,7 +341,7 @@ - SetHandler php5-fcgi + SetHandler php5-fcgi SetHandler php5-fcgi @@ -352,7 +352,7 @@ - SetHandler php5-fcgi + SetHandler php5-fcgi SetHandler php5-fcgi -- GitLab From 6b77f39dfb0c5f495ceb5839e7779b478067580a Mon Sep 17 00:00:00 2001 From: Timo Boldt Date: Thu, 23 Feb 2017 15:27:09 +0100 Subject: [PATCH 124/302] add apache_full_version variable for vhost template See issue #4536 --- server/plugins-available/apache2_plugin.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 9f8e293ad3..762d4b67bc 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1356,6 +1356,7 @@ class apache2_plugin { $tpl->setVar($vhost_data); $tpl->setVar('apache_version', $app->system->getapacheversion()); + $tpl->setVar('apache_full_version', $app->system->getapacheversion(true)); // Rewrite rules $rewrite_rules = array(); @@ -1566,6 +1567,7 @@ class apache2_plugin { $fcgi_tpl = new tpl(); $fcgi_tpl->newTemplate('php-fcgi-starter.master'); $fcgi_tpl->setVar('apache_version', $app->system->getapacheversion()); + $fcgi_tpl->setVar('apache_full_version', $app->system->getapacheversion(true)); // Support for multiple PHP versions (FastCGI) if(trim($data['new']['fastcgi_php_version']) != ''){ @@ -1708,6 +1710,7 @@ class apache2_plugin { $cgi_tpl = new tpl(); $cgi_tpl->newTemplate('php-cgi-starter.master'); $cgi_tpl->setVar('apache_version', $app->system->getapacheversion()); + $cgi_tpl->setVar('apache_full_version', $app->system->getapacheversion(true)); // This works because PHP "rewrites" a symlink to the physical path $php_open_basedir = ($data['new']['php_open_basedir'] == '')?$data['new']['document_root']:$data['new']['php_open_basedir']; @@ -2345,6 +2348,7 @@ class apache2_plugin { $tpl = new tpl(); $tpl->newTemplate('apache_ispconfig.conf.master'); $tpl->setVar('apache_version', $app->system->getapacheversion()); + $tpl->setVar('apache_full_version', $app->system->getapacheversion(true)); $records = $app->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ? AND virtualhost = 'y'", $conf['server_id']); $records_out= array(); @@ -3128,6 +3132,7 @@ class apache2_plugin { $tpl = new tpl(); $tpl->newTemplate('php_fpm_pool.conf.master'); $tpl->setVar('apache_version', $app->system->getapacheversion()); + $tpl->setVar('apache_full_version', $app->system->getapacheversion(true)); $apache_modules = $app->system->getapachemodules(); -- GitLab From 407bd7c17841d0e6ab4a425c46368d78bbf301cc Mon Sep 17 00:00:00 2001 From: Timo Boldt Date: Thu, 23 Feb 2017 16:58:07 +0100 Subject: [PATCH 125/302] fixed mysql password update on mysql > 5.7 See issue #4321 --- .../mysql_clientdb_plugin.inc.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php index 8b04844e22..24cad9a871 100644 --- a/server/plugins-available/mysql_clientdb_plugin.inc.php +++ b/server/plugins-available/mysql_clientdb_plugin.inc.php @@ -680,7 +680,19 @@ class mysql_clientdb_plugin { } if($data['new']['database_password'] != $data['old']['database_password'] && $data['new']['database_password'] != '') { - $link->query("SET PASSWORD FOR '".$link->escape_string($data['new']['database_user'])."'@'$db_host' = '".$link->escape_string($data['new']['database_password'])."';"); + $result = $app->db->queryOneRecord("SELECT VERSION() as version"); + $dbversion = $result['version']; + + if (version_compare($dbversion, '5.7') >= 0) { + $query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s';", + $link->escape_string($data['new']['database_user']), + $db_host, + $link->escape_string($data['new']['database_password'])); + $link->query($query); + } + else { + $link->query("SET PASSWORD FOR '".$link->escape_string($data['new']['database_user'])."'@'$db_host' = '".$link->escape_string($data['new']['database_password'])."';"); + } $app->log('Changing MySQL user password for: '.$data['new']['database_user'].'@'.$db_host, LOGLEVEL_DEBUG); } } -- GitLab From 2741ba3951f3e6a4d3f5e40fe41ac16404a03d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LEVEILLE=20C=C3=A9dric?= Date: Thu, 23 Feb 2017 14:31:26 -0500 Subject: [PATCH 126/302] Revert "Adding extra remote API functions" This reverts commit 6e3c7edd6d512a9f013e16c0f382e1b7136fe2e1. --- interface/lib/classes/remote.d/dns.inc.php | 59 --------------- interface/lib/classes/remote.d/mail.inc.php | 77 -------------------- interface/lib/classes/remote.d/sites.inc.php | 57 --------------- 3 files changed, 193 deletions(-) diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index 7ce5765894..b95e74f768 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -882,65 +882,6 @@ class remoting_dns extends remoting { } } - // ---------------------------------------------------------------------------------------------------------------- - - //* Get record by name / Useful for Dynamic DNS - public function dns_a_get_by_name($session_id, $params) - { - global $app; - - if(!$this->checkPerm($session_id, 'dns_a_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if(!empty($params)) { - $zone = $app->functions->intval($params['zone']); - $name = $params['name']; - $sql = "SELECT id, zone, name, type, data, active FROM dns_rr WHERE zone = ? AND name = ? "; - $result = $app->db->queryOneRecord($sql,$zone,$name); - return $result; - - } - return false; - } - - // Get master zone by ispconfig client id - public function dns_zone_get_status_by_user($session_id, $client_id, $server_id) { - global $app; - if(!$this->checkPerm($session_id, 'dns_zone_get')) { - $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if (!empty($client_id)) { - $server_id = $app->functions->intval($server_id); - $client_id = $app->functions->intval($client_id); - $sql = "SELECT id, origin, d.active FROM dns_soa d INNER JOIN sys_user s on (d.sys_groupid = s.default_group) WHERE client_id = ? AND server_id = ? ORDER BY origin ASC"; - $result = $app->db->queryAllRecords($sql, $client_id, $server_id); - return $result; - } - return false; - } - - // Get slave zone by ispconfig client id - public function dnz_zone_get_slave_by_user($session_id, $client_id, $server_id){ - global $app; - if(!$this->checkPerm($session_id, 'dns_zone_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if (!empty($client_id)) { - $server_id = $app->functions->intval($server_id); - $client_id = $app->functions->intval($client_id); - $sql = "SELECT d.id, d.origin, d.ns, d.active FROM dns_slave d INNER JOIN sys_user s on (d.sys_groupid = s.default_group) WHERE client_id = ? AND server_id = ? ORDER BY origin ASC"; - $result = $app->db->queryAllRecords($sql, $client_id, $server_id); - return $result; - } - return false; - } - } ?> diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index 1a6648a00d..bda7e861ed 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -1104,84 +1104,7 @@ class remoting_mail extends remoting { return $app->quota_lib->get_mailquota_data($client_id, false); } - - // ---------------------------------------------------------------------------------------------------------------- - - - // Get domain zone by ispconfig id - public function mail_domain_get_by_user($session_id, $client_id) - { - global $app; - - if(!$this->checkPerm($session_id, 'mail_domain_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if (!empty($client_id)) { - $client_id = $app->functions->intval($client_id); - $sql = "SELECT domain_id, domain, m.active, m.server_id, svr.server_name FROM mail_domain m INNER JOIN sys_user s on(m.sys_groupid = s.default_group) INNER JOIN server AS svr ON (m.server_id = svr.server_id) WHERE client_id = ? ORDER BY domain ASC"; - $result = $app->db->queryAllRecords($sql, $client_id); - return $result; - } - return false; - } - - // Get email by ispconfig client id - public function mail_users_get_by_user($session_id, $client_id, $domain) - { - global $app; - - if(!$this->checkPerm($session_id, 'mail_user_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if (!empty($client_id)) { - $client_id = $app->functions->intval($client_id); - $sql = "SELECT mailuser_id, email, cc, quota, server_id, postfix as active FROM mail_user m INNER JOIN sys_user s on(m.sys_groupid = s.default_group) WHERE client_id = ? AND email LIKE ? ORDER BY email ASC"; - $result = $app->db->queryAllRecords($sql,$client_id, '%@'.$domain); - return $result; - } - return false; - } - // Get alias or forward by ispconfig client id - public function mail_fw_alias_get_by_user($session_id, $client_id, $domain) - { - global $app; - - if(!$this->checkPerm($session_id, 'mail_user_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if (!empty($client_id) ) { - $client_id = $app->functions->intval($client_id); - $sql = "SELECT forwarding_id, source, destination, type, m.active FROM mail_forwarding m INNER JOIN sys_user s on(m.sys_groupid = s.default_group) WHERE client_id = ? AND source LIKE ? ORDER BY type ASC, source ASC" ; - $result = $app->db->queryAllRecords($sql, $client_id, '%@'.$domain); - return $result; - } - return false; - } - - // Get email id by email - public function mail_user_get_by_email($session_id, $email) - { - global $app; - - if(!$this->checkPerm($session_id, 'mail_user_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if (!empty($email)) { - $sql = "SELECT mailuser_id FROM mail_user WHERE email = ?"; - $result = $app->db->queryOneRecord($sql, $email); - return $result["mailuser_id"]; - } - return false; - } } ?> diff --git a/interface/lib/classes/remote.d/sites.inc.php b/interface/lib/classes/remote.d/sites.inc.php index e689b0ca8c..b5da5aa637 100644 --- a/interface/lib/classes/remote.d/sites.inc.php +++ b/interface/lib/classes/remote.d/sites.inc.php @@ -1008,64 +1008,7 @@ class remoting_sites extends remoting { return $app->quota_lib->get_databasequota_data($client_id, false); } - // ---------------------------------------------------------------------------------------------------------------- - - // Get ftp user by ispconfig client id and site id - public function sites_web_ftp_get_by_id($session_id, $client_id, $parent_domain_id) - { - global $app; - - if(!$this->checkPerm($session_id, 'sites_ftp_user_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if (!empty($client_id) ) { - $client_id = $app->functions->intval($client_id); - $parent_domain_id = $app->functions->intval($parent_domain_id); - $sql = "SELECT ftp_user_id, f.username, f.active FROM ftp_user f INNER JOIN sys_user s on(f.sys_groupid = s.default_group) WHERE client_id = ? AND parent_domain_id = ? ORDER BY f.username ASC" ; - $result = $app->db->queryAllRecords($sql,$client_id, $parent_domain_id); - return $result; - } - return false; - } - // Get site by ispconfig client id - public function sites_web_domain_get_by_id($session_id, $client_id) - { - global $app; - - if(!$this->checkPerm($session_id, 'sites_web_domain_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - - if (!empty($client_id) ) { - $client_id = $app->functions->intval($client_id); - $sql = "SELECT w.domain_id, w.domain, w.type, w.hd_quota, w.active, w.parent_domain_id, svr.server_name FROM web_domain w INNER JOIN sys_user AS s ON(w.sys_groupid = s.default_group) INNER JOIN server AS svr ON (w.server_id = svr.server_id) WHERE s.client_id = ? ORDER BY domain ASC" ; - $result = $app->db->queryAllRecords($sql,$client_id); - return $result; - } - return false; - } - - // Get id website by name - public function website_get_id_by_name($session_id, $params) - { - global $app; - - if(!$this->checkPerm($session_id, 'sites_web_domain_get')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; - } - if(!empty($params)) { - $sql = "SELECT domain_id FROM web_domain WHERE domain = ?"; - $result = $app->db->queryOneRecord($sql, $params); - return $result; - - } - return false; - } } ?> -- GitLab From b8533a6060e490944d86d625cf995171ab2b3dbe Mon Sep 17 00:00:00 2001 From: Timo Boldt Date: Fri, 24 Feb 2017 13:18:38 +0100 Subject: [PATCH 127/302] implemented mariadb See issue #4321 --- .../mysql_clientdb_plugin.inc.php | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php index 24cad9a871..b45ec6390c 100644 --- a/server/plugins-available/mysql_clientdb_plugin.inc.php +++ b/server/plugins-available/mysql_clientdb_plugin.inc.php @@ -683,17 +683,31 @@ class mysql_clientdb_plugin { $result = $app->db->queryOneRecord("SELECT VERSION() as version"); $dbversion = $result['version']; - if (version_compare($dbversion, '5.7') >= 0) { - $query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s';", - $link->escape_string($data['new']['database_user']), - $db_host, - $link->escape_string($data['new']['database_password'])); + // mariadb + if(stripos($dbversion, 'mariadb') !== false) { + $query = sprintf("SET PASSWORD FOR '%s'@'%s' = '%s'", + $link->escape_string($data['new']['database_user']), + $db_host, + $link->escape_string($data['new']['database_password'])); $link->query($query); } + // mysql else { - $link->query("SET PASSWORD FOR '".$link->escape_string($data['new']['database_user'])."'@'$db_host' = '".$link->escape_string($data['new']['database_password'])."';"); + if (version_compare($dbversion, '5.7') >= 0) { + $query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s'", + $link->escape_string($data['new']['database_user']), + $db_host, + $link->escape_string($data['new']['database_password'])); + $link->query($query); + } else { + $query = sprintf("SET PASSWORD FOR '%s'@'%s' = '%s'", + $link->escape_string($data['new']['database_user']), + $db_host, + $link->escape_string($data['new']['database_password'])); + $link->query($query); + } + $app->log('Changing MySQL user password for: ' . $data['new']['database_user'] . '@' . $db_host, LOGLEVEL_DEBUG); } - $app->log('Changing MySQL user password for: '.$data['new']['database_user'].'@'.$db_host, LOGLEVEL_DEBUG); } } -- GitLab From fd0df152e932a38885228a07bddd6496ae12b958 Mon Sep 17 00:00:00 2001 From: Mina Gerges Date: Fri, 24 Feb 2017 15:25:53 +0100 Subject: [PATCH 128/302] Regression: #3931 Call to undefined function swriteln() --- server/lib/classes/monitor_tools.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 557a6214c0..369c98e1de 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -285,7 +285,6 @@ class monitor_tools { } else { $distid = 'centos72'; } - swriteln("Operating System: CentOS $var\n"); } else { $distname = 'Redhat'; $distver = 'Unknown'; -- GitLab From 45007419edcc1f3ce07438f06a9bd108612c4b76 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Sat, 25 Feb 2017 11:55:48 +0100 Subject: [PATCH 129/302] - simplified MR !533 --- .../mysql_clientdb_plugin.inc.php | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php index b45ec6390c..c9af846fbd 100644 --- a/server/plugins-available/mysql_clientdb_plugin.inc.php +++ b/server/plugins-available/mysql_clientdb_plugin.inc.php @@ -683,31 +683,23 @@ class mysql_clientdb_plugin { $result = $app->db->queryOneRecord("SELECT VERSION() as version"); $dbversion = $result['version']; - // mariadb - if(stripos($dbversion, 'mariadb') !== false) { + // mariadb or mysql < 5.7 + if(stripos($dbversion, 'mariadb') !== false || version_compare($dbversion, '5.7', '<')) { $query = sprintf("SET PASSWORD FOR '%s'@'%s' = '%s'", $link->escape_string($data['new']['database_user']), $db_host, $link->escape_string($data['new']['database_password'])); $link->query($query); } - // mysql + // mysql >= 5.7 else { - if (version_compare($dbversion, '5.7') >= 0) { - $query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s'", - $link->escape_string($data['new']['database_user']), - $db_host, - $link->escape_string($data['new']['database_password'])); - $link->query($query); - } else { - $query = sprintf("SET PASSWORD FOR '%s'@'%s' = '%s'", - $link->escape_string($data['new']['database_user']), - $db_host, - $link->escape_string($data['new']['database_password'])); - $link->query($query); - } - $app->log('Changing MySQL user password for: ' . $data['new']['database_user'] . '@' . $db_host, LOGLEVEL_DEBUG); + $query = sprintf("ALTER USER IF EXISTS '%s'@'%s' IDENTIFIED WITH mysql_native_password AS '%s'", + $link->escape_string($data['new']['database_user']), + $db_host, + $link->escape_string($data['new']['database_password'])); + $link->query($query); } + $app->log('Changing MySQL user password for: ' . $data['new']['database_user'] . '@' . $db_host, LOGLEVEL_DEBUG); } } -- GitLab From 9ff57fe7334393566e87648129a7796a96226739 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Thu, 2 Mar 2017 15:42:19 -0600 Subject: [PATCH 130/302] removed empty lines and turn off transactional engine --- install/tpl/pureftpd_mysql.conf.master | 40 +------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/install/tpl/pureftpd_mysql.conf.master b/install/tpl/pureftpd_mysql.conf.master index 484f1054c8..b80f537144 100644 --- a/install/tpl/pureftpd_mysql.conf.master +++ b/install/tpl/pureftpd_mysql.conf.master @@ -5,45 +5,30 @@ # # ############################################## - # Optional : MySQL server name or IP. Don't define this for unix sockets. - MYSQLServer {mysql_server_ip} - # Optional : MySQL port. Don't define this if a local unix socket is used. - # MYSQLPort 3306 - # Optional : define the location of mysql.sock if the server runs on this host. - # MYSQLSocket /var/run/mysqld/mysqld.sock - # Mandatory : user to bind the server as. - MYSQLUser {mysql_server_ispconfig_user} - # Mandatory : user password. You must have a password. - MYSQLPassword {mysql_server_ispconfig_password} - # Mandatory : database to open. - MYSQLDatabase {mysql_server_database} - # Mandatory : how passwords are stored # Valid values are : "cleartext", "crypt", "md5" and "password" # ("password" = MySQL password() function) # You can also use "any" to try "crypt", "md5" *and* "password" - MYSQLCrypt crypt - # In the following directives, parts of the strings are replaced at # run-time before performing queries : # @@ -56,73 +41,50 @@ MYSQLCrypt crypt # Very complex queries can be performed using these substitution strings, # especially for virtual hosting. - # Query to execute in order to fetch the password - MYSQLGetPW SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) - # Query to execute in order to fetch the system user name or uid - MYSQLGetUID SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) - # Optional : default UID - if set this overrides MYSQLGetUID - #MYSQLDefaultUID 1000 - # Query to execute in order to fetch the system user group or gid - MYSQLGetGID SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) - # Optional : default GID - if set this overrides MYSQLGetGID - #MYSQLDefaultGID 1000 - # Query to execute in order to fetch the home directory - MYSQLGetDir SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) - # Optional : query to get the maximal number of files # Pure-FTPd must have been compiled with virtual quotas support. - MySQLGetQTAFS SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) - # Optional : query to get the maximal disk usage (virtual quotas) # The number should be in Megabytes. # Pure-FTPd must have been compiled with virtual quotas support. - MySQLGetQTASZ SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_size != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) - # Optional : ratios. The server has to be compiled with ratio support. - MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) - # Optional : bandwidth throttling. # The server has to be compiled with throttling support. # Values are in KB/s . - MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS : # 1) You know what you are doing. # 2) Real and virtual users match. - # MySQLForceTildeExpansion 1 - # If you upgraded your tables to transactionnal tables (Gemini, # BerkeleyDB, Innobase...), you can enable SQL transactions to # avoid races. Leave this commented if you are using the # traditionnal MyIsam databases or old (< 3.23.x) MySQL versions. - -MySQLTransactions On +MySQLTransactions Off \ No newline at end of file -- GitLab From 22844d499aba0a335b3d1feb7272837f2af49056 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Thu, 2 Mar 2017 15:45:20 -0600 Subject: [PATCH 131/302] otped to comment the line according to pure-ftpd documentation --- install/tpl/pureftpd_mysql.conf.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tpl/pureftpd_mysql.conf.master b/install/tpl/pureftpd_mysql.conf.master index b80f537144..0823f63324 100644 --- a/install/tpl/pureftpd_mysql.conf.master +++ b/install/tpl/pureftpd_mysql.conf.master @@ -87,4 +87,4 @@ MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND ser # BerkeleyDB, Innobase...), you can enable SQL transactions to # avoid races. Leave this commented if you are using the # traditionnal MyIsam databases or old (< 3.23.x) MySQL versions. -MySQLTransactions Off \ No newline at end of file +# MySQLTransactions On \ No newline at end of file -- GitLab From 7c47bce4d2e43b3c6c85f049a9e500e462b09c61 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 3 Mar 2017 17:05:05 +0100 Subject: [PATCH 132/302] Update apache_ispconfig.vhost.master --- install/tpl/apache_ispconfig.vhost.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master index 2a2fa5d2db..ffbb7c03de 100644 --- a/install/tpl/apache_ispconfig.vhost.master +++ b/install/tpl/apache_ispconfig.vhost.master @@ -76,7 +76,7 @@ SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key - SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle + SSLCertificateChainFile /usr/local/ispconfig/interface/ssl/ispserver.bundle SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS SSLHonorCipherOrder On -- GitLab From 201a60d2f3ee3b78723bf3113d5b354fedd475bf Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 3 Mar 2017 17:16:25 +0100 Subject: [PATCH 133/302] Update apache_apps.vhost.master --- server/conf/apache_apps.vhost.master | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/server/conf/apache_apps.vhost.master b/server/conf/apache_apps.vhost.master index 47d35304f6..86814064a8 100644 --- a/server/conf/apache_apps.vhost.master +++ b/server/conf/apache_apps.vhost.master @@ -1,4 +1,3 @@ - ###################################################### # This virtual host contains the configuration # for the ISPConfig apps vhost @@ -10,7 +9,7 @@ ServerAdmin webmaster@localhost {tmpl_var name='apps_vhost_servername'} - + SetHandler None @@ -18,13 +17,7 @@ RequestHeader unset Proxy early - - {tmpl_if name="enable_spdy" op="==" value="y"} - - SpdyEnabled on - - {/tmpl_if} - + DocumentRoot {tmpl_var name='apps_vhost_dir'} AddType application/x-httpd-php .php @@ -46,9 +39,9 @@ Options +Indexes +FollowSymLinks +MultiViews +ExecCGI AllowOverride AuthConfig Indexes Limit Options FileInfo - - SetHandler fcgid-script - + + SetHandler fcgid-script + FCGIWrapper {tmpl_var name='apps_vhost_basedir'}/php-fcgi-scripts/apps/.php-fcgi-starter .php Require all granted -- GitLab From d170d817dad7a8e957bbf53f64e520ef4f286aa0 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 3 Mar 2017 17:17:48 +0100 Subject: [PATCH 134/302] Update apache_ispconfig.conf.master --- server/conf/apache_ispconfig.conf.master | 119 ++++++++++++----------- 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master index f67fe96f58..c6a3b651a8 100644 --- a/server/conf/apache_ispconfig.conf.master +++ b/server/conf/apache_ispconfig.conf.master @@ -1,3 +1,10 @@ +################################################ +# ISPConfig General Apache Options +################################################ +ServerTokens ProductOnly +ServerSignature Off + + ################################################ # ISPConfig Logfile configuration for vlogger @@ -10,110 +17,110 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m AllowOverride None - - Require all denied - - Order Deny,Allow - Deny from all - + + Require all denied + + Order Deny,Allow + Deny from all + # Do not allow access to the root file system of the server for security reasons - Options -Indexes + Options -Indexes AllowOverride None - - Require all denied - - Order Deny,Allow - Deny from all - + + Require all denied + + Order Deny,Allow + Deny from all + AllowOverride None - - Require all denied - - Order Deny,Allow - Deny from all - + + Require all denied + + Order Deny,Allow + Deny from all + # Except of the following directories that contain website scripts - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + # Allow access to mailman on OpenSuSE - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + Options +FollowSymLinks - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + # allow path to awstats and alias for awstats icons - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + @@ -122,16 +129,18 @@ Alias /awstats-icon "/usr/share/awstats/icon" Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-known/acme-challenge - - Require all granted - + + Require all granted + Order allow,deny Allow from all - + + NameVirtualHost *:80 NameVirtualHost *:443 NameVirtualHost {tmpl_var name="ip_address"}:{tmpl_var name="port"} + -- GitLab From b14f2a22a872518c0a5606c6a542a700fe5e25b2 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 3 Mar 2017 17:48:39 +0100 Subject: [PATCH 135/302] Update vhost.conf.master --- server/conf/vhost.conf.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 9faa2b1c7b..124deaf548 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -51,8 +51,8 @@ ErrorDocument 503 /error/503.html - + SSLEngine on SSLProtocol All -SSLv2 -SSLv3 # SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS @@ -71,9 +71,9 @@ SSLStaplingResponderTimeout 5 SSLStaplingReturnResponderErrors off - + # Clear PHP settings of this website -- GitLab From 4e3be3e3bcb440d2176a84f2528e52b9ca8a1a21 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Fri, 3 Mar 2017 12:38:04 -0600 Subject: [PATCH 136/302] context corrected --- install/tpl/apache_ispconfig.conf.master | 6 +++++- server/conf/apache_ispconfig.conf.master | 6 +++++- server/conf/vhost.conf.master | 9 --------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index c6a3b651a8..cb2b1bb6b7 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -4,7 +4,11 @@ ServerTokens ProductOnly ServerSignature Off - + + +SSLStaplingCache shmcb:/var/run/ocsp(128000) + + ################################################ # ISPConfig Logfile configuration for vlogger diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master index c6a3b651a8..cb2b1bb6b7 100644 --- a/server/conf/apache_ispconfig.conf.master +++ b/server/conf/apache_ispconfig.conf.master @@ -4,7 +4,11 @@ ServerTokens ProductOnly ServerSignature Off - + + +SSLStaplingCache shmcb:/var/run/ocsp(128000) + + ################################################ # ISPConfig Logfile configuration for vlogger diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index fdea684eaa..422ecfc319 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -503,15 +503,6 @@ - - - - - SSLStaplingCache shmcb:/var/run/ocsp(128000) - - - - -- GitLab From f6c9e0480603f79604d44aefc78fb30f77dfb25c Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 3 Mar 2017 23:26:43 +0100 Subject: [PATCH 137/302] Revert "context corrected" This reverts commit 4e3be3e3bcb440d2176a84f2528e52b9ca8a1a21 --- install/tpl/apache_ispconfig.conf.master | 6 +----- server/conf/apache_ispconfig.conf.master | 6 +----- server/conf/vhost.conf.master | 9 +++++++++ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index cb2b1bb6b7..c6a3b651a8 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -4,11 +4,7 @@ ServerTokens ProductOnly ServerSignature Off - - -SSLStaplingCache shmcb:/var/run/ocsp(128000) - - + ################################################ # ISPConfig Logfile configuration for vlogger diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master index cb2b1bb6b7..c6a3b651a8 100644 --- a/server/conf/apache_ispconfig.conf.master +++ b/server/conf/apache_ispconfig.conf.master @@ -4,11 +4,7 @@ ServerTokens ProductOnly ServerSignature Off - - -SSLStaplingCache shmcb:/var/run/ocsp(128000) - - + ################################################ # ISPConfig Logfile configuration for vlogger diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 422ecfc319..fdea684eaa 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -503,6 +503,15 @@ + + + + + SSLStaplingCache shmcb:/var/run/ocsp(128000) + + + + -- GitLab From 426b47f9ec38b9c99a2bda7bc754de94d5ecb685 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Fri, 3 Mar 2017 16:31:58 -0600 Subject: [PATCH 138/302] ServerAlias corrected --- .../plugins-available/apache2_plugin.inc.php | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index c0ce95780b..1b5993a92c 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1422,7 +1422,7 @@ class apache2_plugin { unset($client); unset($aa_search); unset($aa_replace); - $server_alias[] .= $auto_alias.' '; + $server_alias[] .= $auto_alias; } // get alias domains (co-domains and subdomains) @@ -1430,23 +1430,23 @@ class apache2_plugin { $alias_seo_redirects = array(); switch($data['new']['subdomain']) { case 'www': - $server_alias[] = 'www.'.$data['new']['domain'].' '; + $server_alias[] = 'www.'.$data['new']['domain']; break; case '*': - $server_alias[] = '*.'.$data['new']['domain'].' '; + $server_alias[] = '*.'.$data['new']['domain']; break; } if(is_array($aliases)) { foreach($aliases as $alias) { switch($alias['subdomain']) { case 'www': - $server_alias[] .= 'www.'.$alias['domain'].' '.$alias['domain'].' '; + $server_alias[] .= 'www.'.$alias['domain'].' '.$alias['domain']; break; case '*': - $server_alias[] .= '*.'.$alias['domain'].' '.$alias['domain'].' '; + $server_alias[] .= '*.'.$alias['domain'].' '.$alias['domain']; break; default: - $server_alias[] .= $alias['domain'].' '; + $server_alias[] .= $alias['domain']; break; } $app->log('Add server alias: '.$alias['domain'], LOGLEVEL_DEBUG); @@ -1513,22 +1513,12 @@ class apache2_plugin { } //* If we have some alias records - if(count($server_alias) > 0) { - $server_alias_str = ''; - $n = 0; - - // begin a new ServerAlias line after 30 alias domains - foreach($server_alias as $tmp_alias) { - if($n % 30 == 0) $server_alias_str .= "\n ServerAlias "; - $server_alias_str .= $tmp_alias; - } - unset($tmp_alias); - - $tpl->setVar('alias', trim($server_alias_str)); + if($server_alias)) { + $tpl->setVar('alias', 'ServerAlias '.implode(' ',$server_alias)); } else { $tpl->setVar('alias', ''); } - + if (count($rewrite_wildcard_rules) > 0) $rewrite_rules = array_merge($rewrite_rules, $rewrite_wildcard_rules); // Append wildcard rules to the end of rules if(count($rewrite_rules) > 0 || $vhost_data['seo_redirect_enabled'] > 0 || count($alias_seo_redirects) > 0 || $data['new']['rewrite_to_https'] == 'y') { -- GitLab From 74e722711e0cc56daaa174623da11e5b643a9d1f Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Fri, 3 Mar 2017 16:33:51 -0600 Subject: [PATCH 139/302] comment modified --- server/plugins-available/apache2_plugin.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 1b5993a92c..d7577750b1 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1,5 +1,4 @@ Date: Fri, 3 Mar 2017 16:35:34 -0600 Subject: [PATCH 140/302] comment --- server/plugins-available/apache2_plugin.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index d7577750b1..1b5993a92c 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1,4 +1,5 @@ Date: Fri, 3 Mar 2017 20:17:46 -0600 Subject: [PATCH 141/302] seo_redirects improved --- server/plugins-available/apache2_plugin.inc.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 1b5993a92c..a752d33050 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -3440,37 +3440,35 @@ class apache2_plugin { if(substr($web['domain'], 0, 2) === '*.') $web['subdomain'] = '*'; if($web['subdomain'] == 'www' || $web['subdomain'] == '*'){ + $domain = str_replace('.', '\.', $web['domain']); if($web['seo_redirect'] == 'non_www_to_www'){ - $seo_redirects[$prefix.'seo_redirect_origin_domain'] = str_replace('.', '\.', $web['domain']); + $seo_redirects[$prefix.'seo_redirect_origin_domain'] = $domain; $seo_redirects[$prefix.'seo_redirect_target_domain'] = 'www.'.$web['domain']; $seo_redirects[$prefix.'seo_redirect_operator'] = ''; } if($web['seo_redirect'] == '*_domain_tld_to_www_domain_tld'){ - // ^(example\.com|(?!\bwww\b)\.example\.com)$ - // ^(example\.com|((?:\w+(?:-\w+)*\.)*)((?!www\.)\w+(?:-\w+)*)(\.example\.com))$ - $seo_redirects[$prefix.'seo_redirect_origin_domain'] = '('.str_replace('.', '\.', $web['domain']).'|((?:\w+(?:-\w+)*\.)*)((?!www\.)\w+(?:-\w+)*)(\.'.str_replace('.', '\.', $web['domain']).'))'; + $seo_redirects[$prefix.'seo_redirect_origin_domain'] = $domain.'|.*\.'.$domain.'(? Date: Sat, 4 Mar 2017 04:25:17 +0100 Subject: [PATCH 142/302] Update apache2_plugin.inc.php --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 1b5993a92c..7bec35fee5 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1513,7 +1513,7 @@ class apache2_plugin { } //* If we have some alias records - if($server_alias)) { + if($server_alias) { $tpl->setVar('alias', 'ServerAlias '.implode(' ',$server_alias)); } else { $tpl->setVar('alias', ''); -- GitLab From bdc0f24a5bf7890b6696d2e5e46a2127b36ff88d Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 4 Mar 2017 04:26:55 +0100 Subject: [PATCH 143/302] Update apache2_plugin.inc.php --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index a752d33050..c23b69edf9 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1513,7 +1513,7 @@ class apache2_plugin { } //* If we have some alias records - if($server_alias)) { + if($server_alias) { $tpl->setVar('alias', 'ServerAlias '.implode(' ',$server_alias)); } else { $tpl->setVar('alias', ''); -- GitLab From 981a15b20be55efdc9bd75801c9323eb07123af8 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 4 Mar 2017 17:55:53 +0100 Subject: [PATCH 144/302] Update apache2_plugin.inc.php --- server/plugins-available/apache2_plugin.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 7bec35fee5..31f7a96c81 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1514,7 +1514,13 @@ class apache2_plugin { //* If we have some alias records if($server_alias) { - $tpl->setVar('alias', 'ServerAlias '.implode(' ',$server_alias)); + //* begin a new ServerAlias line after 32 alias domains to avoid apache bugs + $server_alias_str = 'ServerAlias '.$server_alias[0]; + for($n=1;$nsetVar('alias', $server_alias_str); + unset($server_alias_str); + unset($n); } else { $tpl->setVar('alias', ''); } -- GitLab From 7e2f8b607a918ab177438578ae87d45f9c641e58 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sat, 4 Mar 2017 11:11:40 -0600 Subject: [PATCH 145/302] improved --- server/plugins-available/apache2_plugin.inc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 31f7a96c81..e8953bd0ed 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1514,13 +1514,13 @@ class apache2_plugin { //* If we have some alias records if($server_alias) { - //* begin a new ServerAlias line after 32 alias domains to avoid apache bugs - $server_alias_str = 'ServerAlias '.$server_alias[0]; - for($n=1;$nsetVar('alias', $server_alias_str); - unset($server_alias_str); - unset($n); + unset($server_alias_str); + unset($n); } else { $tpl->setVar('alias', ''); } -- GitLab From 1e9a68db95fda1219a477bd65148def0cbd7b0f5 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sat, 4 Mar 2017 11:33:00 -0600 Subject: [PATCH 146/302] updated --- server/plugins-available/apache2_plugin.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index c23b69edf9..c4059e42c4 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1514,7 +1514,13 @@ class apache2_plugin { //* If we have some alias records if($server_alias) { - $tpl->setVar('alias', 'ServerAlias '.implode(' ',$server_alias)); + //* begin a new ServerAlias line after 32 alias domains to avoid apache bugs + $server_alias_str = 'ServerAlias '.$server_alias[0]; + for($n=1;$nsetVar('alias', $server_alias_str); + unset($server_alias_str); + unset($n); } else { $tpl->setVar('alias', ''); } -- GitLab From f8635ed3b630676d1a32c50fbd34f59ee9fb659b Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sat, 4 Mar 2017 14:24:52 -0600 Subject: [PATCH 147/302] 10 => 7 --- interface/web/sites/form/ftp_user.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/form/ftp_user.tform.php b/interface/web/sites/form/ftp_user.tform.php index 239bfdb858..3b2ad1aee9 100644 --- a/interface/web/sites/form/ftp_user.tform.php +++ b/interface/web/sites/form/ftp_user.tform.php @@ -203,7 +203,7 @@ if($app->auth->is_admin()) { 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'directory_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^\/[a-zA-Z0-9\ \.\-\_\/]{10,128}$/', + 'regex' => '/^\/[a-zA-Z0-9\ \.\-\_\/]{7,128}$/', 'errmsg'=> 'directory_error_regex'), 2 => array ( 'type' => 'CUSTOM', 'class' => 'validate_ftpuser', -- GitLab From 0ef99993fd3903a18ff8345ba2c658001e7dd0a1 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sat, 4 Mar 2017 14:54:50 -0600 Subject: [PATCH 148/302] changes for letting certbot clean interface/acme and stop serving empty.dir file on all vhosts --- interface/acme/{.well-known/acme-challenge => }/empty.dir | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename interface/acme/{.well-known/acme-challenge => }/empty.dir (100%) diff --git a/interface/acme/.well-known/acme-challenge/empty.dir b/interface/acme/empty.dir similarity index 100% rename from interface/acme/.well-known/acme-challenge/empty.dir rename to interface/acme/empty.dir -- GitLab From f0d2775eef87255973ce8e0dacacc4921e154703 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 4 Mar 2017 22:07:25 +0100 Subject: [PATCH 149/302] Update ftp_user.tform.php --- interface/web/sites/form/ftp_user.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/form/ftp_user.tform.php b/interface/web/sites/form/ftp_user.tform.php index 3b2ad1aee9..239bfdb858 100644 --- a/interface/web/sites/form/ftp_user.tform.php +++ b/interface/web/sites/form/ftp_user.tform.php @@ -203,7 +203,7 @@ if($app->auth->is_admin()) { 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'directory_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^\/[a-zA-Z0-9\ \.\-\_\/]{7,128}$/', + 'regex' => '/^\/[a-zA-Z0-9\ \.\-\_\/]{10,128}$/', 'errmsg'=> 'directory_error_regex'), 2 => array ( 'type' => 'CUSTOM', 'class' => 'validate_ftpuser', -- GitLab From fe8cc45175df97d1782b897056a6f90d0d1b9615 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 5 Mar 2017 19:24:14 +0100 Subject: [PATCH 150/302] Update ftp_user.tform.php --- interface/web/sites/form/ftp_user.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/form/ftp_user.tform.php b/interface/web/sites/form/ftp_user.tform.php index 239bfdb858..3b2ad1aee9 100644 --- a/interface/web/sites/form/ftp_user.tform.php +++ b/interface/web/sites/form/ftp_user.tform.php @@ -203,7 +203,7 @@ if($app->auth->is_admin()) { 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'directory_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^\/[a-zA-Z0-9\ \.\-\_\/]{10,128}$/', + 'regex' => '/^\/[a-zA-Z0-9\ \.\-\_\/]{7,128}$/', 'errmsg'=> 'directory_error_regex'), 2 => array ( 'type' => 'CUSTOM', 'class' => 'validate_ftpuser', -- GitLab From b7bd2321e0a57149b1fc03a00870eb99b1f13a6d Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 6 Mar 2017 11:41:12 -0600 Subject: [PATCH 151/302] unused --- interface/index.htm | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 interface/index.htm diff --git a/interface/index.htm b/interface/index.htm deleted file mode 100644 index 9e38208a2d..0000000000 --- a/interface/index.htm +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - -- GitLab From f422749bc18c0906eaedbdf635b6f71f45033785 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 6 Mar 2017 20:43:55 -0600 Subject: [PATCH 152/302] 2017 --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 139b12fc1f..251ad34977 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2007-2016, Till Brehm, ISPConfig UG +Copyright (c) 2007-2017, Till Brehm, ISPConfig UG All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -22,4 +22,4 @@ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- GitLab From 1d3ccc7d9daaacdddcde24d2596e017fa0b7c45a Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 6 Mar 2017 20:45:12 -0600 Subject: [PATCH 153/302] new line --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 251ad34977..0624f7491f 100644 --- a/LICENSE +++ b/LICENSE @@ -22,4 +22,4 @@ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file -- GitLab From 109c839f169341ae5b1e6bc17fa604b91b20673d Mon Sep 17 00:00:00 2001 From: Manuel Dalla Lana Date: Thu, 9 Mar 2017 17:31:25 +0100 Subject: [PATCH 154/302] Add Devuan basic support --- install/lib/install.lib.php | 17 +++++++++ install/lib/installer_base.lib.php | 2 +- install/tpl/nginx_apps.vhost.master | 4 +-- .../web/admin/lib/lang/en_server_config.lng | 2 +- .../web/admin/lib/lang/it_server_config.lng | 2 +- server/conf/nginx_apps.vhost.master | 4 +-- .../cron.d/100-monitor_system_update.inc.php | 4 +-- server/lib/classes/monitor_tools.inc.php | 35 +++++++++++++++++++ .../plugins-available/firewall_plugin.inc.php | 8 ++--- .../network_settings_plugin.inc.php | 2 +- .../software_update_plugin.inc.php | 4 +-- 11 files changed, 68 insertions(+), 16 deletions(-) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index c58ca51ef8..2f601e31c3 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -220,6 +220,23 @@ function get_distname() { } } + //** Devuan + elseif(file_exists('/etc/devuan_version')) { + if(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'jessie')) { + $distname = 'Devuan'; + $distver = 'Jessie'; + $distid = 'debian60'; + $distbaseid = 'debian'; + swriteln("Operating System: Devuan 1.0 (Jessie) or compatible\n"); + } elseif(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'ceres')) { + $distname = 'Devuan'; + $distver = 'Ceres'; + $distid = 'debiantesting'; + $distbaseid = 'debian'; + swriteln("Operating System: Devuan Unstable (Ceres) or compatible\n"); + } + } + //** OpenSuSE elseif(file_exists('/etc/SuSE-release')) { if(stristr(file_get_contents('/etc/SuSE-release'), '11.0')) { diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 8e328228ca..05ff5e4483 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1484,7 +1484,7 @@ class installer_base { public function configure_spamassassin() { global $conf; - //* Enable spamasasssin on debian and ubuntu + //* Enable spamasasssin on debian, devuan and ubuntu $configfile = '/etc/default/spamassassin'; if(is_file($configfile)) { copy($configfile, $configfile.'~'); diff --git a/install/tpl/nginx_apps.vhost.master b/install/tpl/nginx_apps.vhost.master index e1bb6d1849..701f3defb1 100644 --- a/install/tpl/nginx_apps.vhost.master +++ b/install/tpl/nginx_apps.vhost.master @@ -97,7 +97,7 @@ server { # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; - # To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used + # To access phpMyAdmin, the default user (like www-data on Debian/Devuan/Ubuntu) must be used {use_tcp}fastcgi_pass 127.0.0.1:9000; {use_socket}fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; @@ -147,7 +147,7 @@ server { # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; - # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used + # To access SquirrelMail, the default user (like www-data on Debian/Devuan/Ubuntu) must be used {use_tcp}fastcgi_pass 127.0.0.1:9000; {use_socket}fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index eb55088eb2..42dfd8a6b0 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -94,7 +94,7 @@ $wb["named_conf_local_path_txt"] = 'BIND named.conf.local path'; $wb["php_ini_path_cgi_txt"] = 'CGI php.ini path'; $wb["php_ini_path_apache_txt"] = 'Apache php.ini path'; $wb["check_apache_config_txt"] = 'Test apache configuration on restart'; -$wb["network_config_warning_txt"] = 'The network configuration option is only available for Debian and Ubuntu Servers. Do not enable this option if your network interface is not eth0.'; +$wb["network_config_warning_txt"] = 'The network configuration option is only available for Debian, Devuan and Ubuntu Servers. Do not enable this option if your network interface is not eth0.'; $wb["CA_path_txt"] = 'CA Path'; $wb["CA_pass_txt"] = 'CA passphrase'; $wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax'; diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index 6db41c8b7a..5e234fb214 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -83,7 +83,7 @@ $wb['ufw_default_forward_policy_txt'] = 'Default Forward Policy'; $wb['ufw_default_application_policy_txt'] = 'Default Application Policy'; $wb['ufw_log_level_txt'] = 'Livello di Log'; $wb['website_symlinks_rel_txt'] = 'Make relative symlinks'; -$wb['network_config_warning_txt'] = 'L opzione di configurazione di rete è disponibile solo per Debian and Ubuntu Servers. Non abilitare se la tua interfaccia di rete non è eth0.'; +$wb['network_config_warning_txt'] = 'L\'opzione di configurazione di rete è disponibile solo per Debian, Devuan e Ubuntu Server. Non abilitare se la tua interfaccia di rete non è eth0.'; $wb['CA_path_txt'] = 'Percorso CA'; $wb['CA_pass_txt'] = 'CA passphrase'; $wb['fastcgi_config_syntax_txt'] = 'Sintassi configurazione FastCGI'; diff --git a/server/conf/nginx_apps.vhost.master b/server/conf/nginx_apps.vhost.master index ed5e3a49ae..75daa4df8f 100644 --- a/server/conf/nginx_apps.vhost.master +++ b/server/conf/nginx_apps.vhost.master @@ -89,7 +89,7 @@ server { # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; - # To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used + # To access phpMyAdmin, the default user (like www-data on Debian/Devuan/Ubuntu) must be used {use_tcp}fastcgi_pass 127.0.0.1:9000; {use_socket}fastcgi_pass unix:{fpm_socket}; fastcgi_index index.php; @@ -139,7 +139,7 @@ server { # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; - # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used + # To access SquirrelMail, the default user (like www-data on Debian/Devuan/Ubuntu) must be used {use_tcp}fastcgi_pass 127.0.0.1:9000; {use_socket}fastcgi_pass unix:{fpm_socket}; fastcgi_index index.php; diff --git a/server/lib/classes/cron.d/100-monitor_system_update.inc.php b/server/lib/classes/cron.d/100-monitor_system_update.inc.php index c610a84943..f2faeeb551 100644 --- a/server/lib/classes/cron.d/100-monitor_system_update.inc.php +++ b/server/lib/classes/cron.d/100-monitor_system_update.inc.php @@ -70,8 +70,8 @@ class cronjob_monitor_system_update extends cronjob { $type = 'system_update'; - /* This monitoring is only available on Debian or Ubuntu */ - if (file_exists('/etc/debian_version')) { + /* This monitoring is only available on Debian, Devuan or Ubuntu */ + if (file_exists('/etc/debian_version') || file_exists('/etc/devuan_version')) { /* * first update the "apt database" diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 369c98e1de..2b0252212d 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -207,6 +207,21 @@ class monitor_tools { } } + //** Devuan + elseif(file_exists('/etc/devuan_version')) { + if(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'jessie')) { + $distname = 'Devuan'; + $distver = 'Jessie'; + $distid = 'debian60'; + $distbaseid = 'debian'; + } elseif(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'ceres')) { + $distname = 'Devuan'; + $distver = 'Testing'; + $distid = 'debiantesting'; + $distbaseid = 'debian'; + } + } + //** OpenSuSE elseif(file_exists('/etc/SuSE-release')) { if(stristr(file_get_contents('/etc/SuSE-release'), '11.0')) { @@ -450,6 +465,8 @@ class monitor_tools { if (@is_file('/etc/debian_version')) { $dist = 'debian'; + } elseif (@is_file('/etc/devuan_version')) { + $dist = 'devuan'; } elseif (@is_file('/etc/redhat-release')) { $dist = 'redhat'; } elseif (@is_file('/etc/SuSE-release')) { @@ -462,6 +479,8 @@ class monitor_tools { case 'log_mail': if ($dist == 'debian') { $logfile = '/var/log/mail.log'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/mail.log'; } elseif ($dist == 'redhat') { $logfile = '/var/log/maillog'; } elseif ($dist == 'suse') { @@ -473,6 +492,8 @@ class monitor_tools { case 'log_mail_warn': if ($dist == 'debian') { $logfile = '/var/log/mail.warn'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/mail.warn'; } elseif ($dist == 'redhat') { $logfile = '/var/log/maillog'; } elseif ($dist == 'suse') { @@ -484,6 +505,8 @@ class monitor_tools { case 'log_mail_err': if ($dist == 'debian') { $logfile = '/var/log/mail.err'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/mail.err'; } elseif ($dist == 'redhat') { $logfile = '/var/log/maillog'; } elseif ($dist == 'suse') { @@ -495,6 +518,8 @@ class monitor_tools { case 'log_messages': if ($dist == 'debian') { $logfile = '/var/log/syslog'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/syslog'; } elseif ($dist == 'redhat') { $logfile = '/var/log/messages'; } elseif ($dist == 'suse') { @@ -506,6 +531,8 @@ class monitor_tools { case 'log_ispc_cron': if ($dist == 'debian') { $logfile = $conf['ispconfig_log_dir'] . '/cron.log'; + } elseif ($dist == 'devuan') { + $logfile = $conf['ispconfig_log_dir'] . '/cron.log'; } elseif ($dist == 'redhat') { $logfile = $conf['ispconfig_log_dir'] . '/cron.log'; } elseif ($dist == 'suse') { @@ -517,6 +544,8 @@ class monitor_tools { case 'log_freshclam': if ($dist == 'debian') { $logfile = '/var/log/clamav/freshclam.log'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/clamav/freshclam.log'; } elseif ($dist == 'redhat') { $logfile = (is_file('/var/log/clamav/freshclam.log') ? '/var/log/clamav/freshclam.log' : '/var/log/freshclam.log'); } elseif ($dist == 'suse') { @@ -528,6 +557,8 @@ class monitor_tools { case 'log_clamav': if ($dist == 'debian') { $logfile = '/var/log/clamav/clamav.log'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/clamav/clamav.log'; } elseif ($dist == 'redhat') { $logfile = (is_file('/var/log/clamav/clamd.log') ? '/var/log/clamav/clamd.log' : '/var/log/maillog'); } elseif ($dist == 'suse') { @@ -539,6 +570,8 @@ class monitor_tools { case 'log_fail2ban': if ($dist == 'debian') { $logfile = '/var/log/fail2ban.log'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/fail2ban.log'; } elseif ($dist == 'redhat') { $logfile = '/var/log/fail2ban.log'; } elseif ($dist == 'suse') { @@ -553,6 +586,8 @@ class monitor_tools { case 'log_ispconfig': if ($dist == 'debian') { $logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log'; + } elseif ($dist == 'devuan') { + $logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log'; } elseif ($dist == 'redhat') { $logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log'; } elseif ($dist == 'suse') { diff --git a/server/plugins-available/firewall_plugin.inc.php b/server/plugins-available/firewall_plugin.inc.php index 67ed2379fb..a122924951 100644 --- a/server/plugins-available/firewall_plugin.inc.php +++ b/server/plugins-available/firewall_plugin.inc.php @@ -205,7 +205,7 @@ class firewall_plugin { } else { //* Ensure that bastille firewall is stopped exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null'); - if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove'); + if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove'); //* Start ufw firewall exec('ufw --force enable'); @@ -258,12 +258,12 @@ class firewall_plugin { exec('ufw disable'); } exec($conf['init_scripts'] . '/' . 'bastille-firewall restart 2>/dev/null'); - if(@is_file('/etc/debian_version')) exec('update-rc.d bastille-firewall defaults'); + if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d bastille-firewall defaults'); if(@is_file('/sbin/insserv')) exec('insserv -d bastille-firewall'); $app->log('Restarting the firewall', LOGLEVEL_DEBUG); } else { exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null'); - if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove'); + if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove'); if(@is_file('/sbin/insserv')) exec('insserv -r -f bastille-firewall'); $app->log('Stopping the firewall', LOGLEVEL_DEBUG); } @@ -275,7 +275,7 @@ class firewall_plugin { global $app, $conf; exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null'); - if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove'); + if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove'); if(@is_file('/sbin/insserv')) exec('insserv -r -f bastille-firewall'); $app->log('Stopping the firewall', LOGLEVEL_DEBUG); diff --git a/server/plugins-available/network_settings_plugin.inc.php b/server/plugins-available/network_settings_plugin.inc.php index 5ce6f934b8..56a2512d40 100644 --- a/server/plugins-available/network_settings_plugin.inc.php +++ b/server/plugins-available/network_settings_plugin.inc.php @@ -86,7 +86,7 @@ class network_settings_plugin { $server_config['ip_address'] != '0.0.0.0' && $server_config['gateway'] != '0.0.0.0') { - if (is_file('/etc/debian_version')) + if (is_file('/etc/debian_version') || is_file('/etc/devuan_version')) { copy('/etc/network/interfaces', '/etc/network/interfaces~'); diff --git a/server/plugins-available/software_update_plugin.inc.php b/server/plugins-available/software_update_plugin.inc.php index 640d7a962b..3f6ae3d8d1 100644 --- a/server/plugins-available/software_update_plugin.inc.php +++ b/server/plugins-available/software_update_plugin.inc.php @@ -278,10 +278,10 @@ class software_update_plugin { global $app; //** Debian and compatible Linux distributions - if(file_exists('/etc/debian_version')) { + if(file_exists('/etc/debian_version') || file_exists('/etc/devuan_version')) { exec("aptitude update"); exec("aptitude safe-upgrade -y"); - $app->log('Execeuted Debian / Ubuntu update', LOGLEVEL_DEBUG); + $app->log('Execeuted Debian / Devuan / Ubuntu update', LOGLEVEL_DEBUG); } //** Gentoo Linux -- GitLab From 60a64a217b755761bbd9e6889950163649009c38 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sat, 11 Mar 2017 23:00:05 -0600 Subject: [PATCH 155/302] webdav improved --- server/conf/vhost.conf.master | 29 ++++---- .../plugins-available/apache2_plugin.inc.php | 71 ++++++------------- 2 files changed, 35 insertions(+), 65 deletions(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index fdea684eaa..cab89e6eef 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -482,23 +482,20 @@ AssignUserId - - # Do not execute PHP files in webdav directory - - - SecRuleRemoveById 960015 - SecRuleRemoveById 960032 - - - SetHandler None - - - DavLockDB {tmpl_var name='document_root'}/tmp/DavLock - # DO NOT REMOVE THE COMMENTS! - # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE! - # WEBDAV BEGIN - # WEBDAV END + + + + SecRuleRemoveById 960015 + SecRuleRemoveById 960032 + DirectoryIndex disabled + SetHandler None + + DavLockDB {tmpl_var name='document_root'}/tmp/DavLock + # needed by apache2_plugin.inc.php + # WEBDAV BEGIN + # WEBDAV END + diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index c4059e42c4..22d33953f1 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2878,76 +2878,49 @@ class apache2_plugin { $in = fopen($fileName, 'r'); $output = ''; $inWebdavSection = false; - - /* - * read line by line and search for the username and authname - */ + //* read line by line and search for the username and authname while ($line = fgets($in)) { - /* - * is the "replace-comment" found... - */ + //* is the "replace-comment" found... if (trim($line) == '# WEBDAV BEGIN') { - /* - * The begin of the webdav - section is found, so ignore all lines til the end is found - */ + //* The begin of the webdav - section is found, so ignore all lines til the end is found $inWebdavSection = true; - - $output .= " # WEBDAV BEGIN\n"; - - /* - * add all the webdav-dirs to the webdav-section - */ + $output .= "# WEBDAV BEGIN\n"; + //* add all the webdav-dirs to the webdav-section $files = @scandir($webdavRoot); if(is_array($files)) { foreach($files as $file) { if (substr($file, strlen($file) - strlen('.htdigest')) == '.htdigest' && preg_match("/^[a-zA-Z0-9\-_\.]*$/", $file)) { - /* - * found a htdigest - file, so add it to webdav - */ + //* found a htdigest - file, so add it to webdav $fn = substr($file, 0, strlen($file) - strlen('.htdigest')); - $output .= "\n"; - // $output .= " Alias /" . $fn . ' ' . $webdavRoot . '/' . $fn . "\n"; - // $output .= " \n"; - $output .= " Alias /webdav/" . $fn . ' ' . $webdavRoot . '/' . $fn . "\n"; - $output .= " \n"; - $output .= " DAV On\n"; - $output .= ' BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On'."\n"; - $output .= " AuthType Digest\n"; - $output .= " AuthName \"" . $fn . "\"\n"; - $output .= " AuthUserFile " . $webdavRoot . '/' . $file . "\n"; - $output .= " Require valid-user \n"; - $output .= " Options +Indexes \n"; - $output .= " Order allow,deny \n"; - $output .= " Allow from all \n"; - $output .= " \n"; + $output .= "Alias /webdav/$fn $webdavRoot/$fn\n"; + $output .= "\n"; + $output .= "Dav On\n"; + $output .= "BrowserMatch MSIE AuthDigestEnableQueryStringHack=On\n"; + $output .= "AuthType Digest\n"; + $output .= "AuthName \"$fn\"\n"; + $output .= "AuthUserFile $webdavRoot/$file\n"; + $output .= "Require valid-user\n"; + $output .= "Options +Indexes\n"; + if($app->system->getapacheversion()<=2.2) + $output .= "Order allow,deny\nAllow from all\n"; + $output .= "\n"; } } } } - /* - * is the "replace-comment-end" found... - */ + //* is the "replace-comment-end" found... if (trim($line) == '# WEBDAV END') { - /* - * The end of the webdav - section is found, so stop ignoring - */ + //* The end of the webdav - section is found, so stop ignoring $inWebdavSection = false; } - - /* - * Write the line to the output, if it is not in the section - */ + //* Write the line to the output, if it is not in the section if (!$inWebdavSection) { $output .= $line; } } fclose($in); - - /* - * Now lets write the new file - */ + //* Now lets write the new file $app->system->file_put_contents($fileName, $output); - } //* Update the awstats configuration file -- GitLab From 53a38a939e179930d6707881f18de345baae2e47 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 14 Mar 2017 09:57:53 +0100 Subject: [PATCH 156/302] Add new packages status config --- interface/web/admin/templates/system_config_sites_edit.htm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/web/admin/templates/system_config_sites_edit.htm b/interface/web/admin/templates/system_config_sites_edit.htm index 1c4c5c6f9a..500d69e818 100644 --- a/interface/web/admin/templates/system_config_sites_edit.htm +++ b/interface/web/admin/templates/system_config_sites_edit.htm @@ -45,6 +45,12 @@ {tmpl_var name='vhost_aliasdomains'} {tmpl_var name='vhost_aliasdomains_note_txt'}
+
+ +
+ {tmpl_var name='asp_new_package_disabled'} +
+
-- GitLab From 1a5af58f44d7070f6901f2c23e0753949e4e7ff9 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 14 Mar 2017 10:00:18 +0100 Subject: [PATCH 157/302] Add new packages status config --- interface/web/admin/form/system_config.tform.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php index 658596e7aa..8c7de7ba94 100644 --- a/interface/web/admin/form/system_config.tform.php +++ b/interface/web/admin/form/system_config.tform.php @@ -160,6 +160,12 @@ $form["tabs"]['sites'] = array ( 'default' => 'n', 'value' => array(0 => 'n', 1 => 'y') ), + 'asp_new_package_disabled' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), 'client_username_web_check_disabled' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', -- GitLab From 6180004b04c388882cbe5b60c521228b20ed71b0 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 14 Mar 2017 10:02:42 +0100 Subject: [PATCH 158/302] Add new packages status config --- interface/lib/classes/aps_crawler.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/aps_crawler.inc.php b/interface/lib/classes/aps_crawler.inc.php index 99db77bdbf..39322b799e 100644 --- a/interface/lib/classes/aps_crawler.inc.php +++ b/interface/lib/classes/aps_crawler.inc.php @@ -568,6 +568,9 @@ class ApsCrawler extends ApsBase //$pkg_url = $this->app_download_url_list[$pkg]; $pkg_url = @file_get_contents($this->interface_pkg_dir.'/'.$pkg.'/PKG_URL'); + //* Get global sites config + $sites_config = $app->getconf->get_global_config('sites'); + // Insert only if data is complete if($pkg != '' && $pkg_name != '' && $pkg_category != '' && $pkg_version != '' && $pkg_release != '' && $pkg_url){ $insert_data = array( @@ -577,7 +580,7 @@ class ApsCrawler extends ApsBase "version" => $pkg_version, "release" => $pkg_release, "package_url" => $pkg_url, - "package_status" => PACKAGE_ENABLED + "package_status" => $sites_config['asp_new_package_disabled'] == 'y' ? PACKAGE_LOCKED : PACKAGE_ENABLED ); $app->db->datalogInsert('aps_packages', $insert_data, 'id'); } else { -- GitLab From af0baebe9ecead2dfa41abf74386d9a5fd1b8723 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 14 Mar 2017 10:04:07 +0100 Subject: [PATCH 159/302] Add new packages status config --- interface/web/admin/lib/lang/en_system_config.lng | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index aa0ea47d4f..23adf4e9ad 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -17,6 +17,7 @@ $wb['vhost_subdomains_txt'] = 'Create subdomains as web site'; $wb['vhost_subdomains_note_txt'] = 'You cannot disable this as long as vhost subdomains exist in the system!'; $wb['vhost_aliasdomains_txt'] = 'Create aliasdomains as web site'; $wb['vhost_aliasdomains_note_txt'] = 'You cannot disable this as long as vhost aliasdomains exist in the system!'; +$wb["asp_new_package_disabled_txt"] = 'Disable new aps packages'; $wb["dbname_prefix_error_regex"] = 'Char not allowed in database name prefix.'; $wb["dbuser_prefix_error_regex"] = 'Char not allowed in database user prefix.'; $wb["ftpuser_prefix_error_regex"] = 'Char not allowed in ftp user prefix.'; -- GitLab From dbec32fa1ea8681896a731e411fea4bc2c8cd420 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 16 Mar 2017 12:15:40 +0100 Subject: [PATCH 160/302] Add new packages status config --- install/tpl/server.ini.master | 1 + 1 file changed, 1 insertion(+) diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index d08251af9c..750777e444 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -111,6 +111,7 @@ overquota_notify_freq=7 overquota_db_notify_admin=y overquota_db_notify_client=y overquota_notify_onok=n +asp_new_package_disabled=y [dns] bind_user=root -- GitLab From f110f324351de3a467391982b55e7bb22adae818 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 16 Mar 2017 13:34:12 +0100 Subject: [PATCH 161/302] Revert "Add new packages status config" This reverts commit dbec32fa1ea8681896a731e411fea4bc2c8cd420 --- install/tpl/server.ini.master | 1 - 1 file changed, 1 deletion(-) diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 750777e444..d08251af9c 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -111,7 +111,6 @@ overquota_notify_freq=7 overquota_db_notify_admin=y overquota_db_notify_client=y overquota_notify_onok=n -asp_new_package_disabled=y [dns] bind_user=root -- GitLab From ce8d5afe26458e7e7d8c2d509cbb634a0ead34e1 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 16 Mar 2017 13:35:33 +0100 Subject: [PATCH 162/302] Add new packages status config --- install/tpl/system.ini.master | 1 + 1 file changed, 1 insertion(+) diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master index 4742da291d..201f14203f 100644 --- a/install/tpl/system.ini.master +++ b/install/tpl/system.ini.master @@ -32,6 +32,7 @@ vhost_aliasdomains=n client_username_web_check_disabled=n backups_include_into_web_quota=n reseller_can_use_options=n +asp_new_package_disabled=y [tools] -- GitLab From 0415e6afb7ad0eca3ba71908d42756ee8d4595d6 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Thu, 16 Mar 2017 12:37:57 -0600 Subject: [PATCH 163/302] fixes dontlog vulnerability --- install/tpl/apache_ispconfig.conf.master | 4 +--- server/conf/apache_ispconfig.conf.master | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index c6a3b651a8..4721979d1e 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -10,10 +10,8 @@ ServerSignature Off # ISPConfig Logfile configuration for vlogger ################################################ -SetEnvIf Request_URI "^/datalogstatus.php$" dontlog - LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig -CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig env=!dontlog +CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig AllowOverride None diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master index c6a3b651a8..4721979d1e 100644 --- a/server/conf/apache_ispconfig.conf.master +++ b/server/conf/apache_ispconfig.conf.master @@ -10,10 +10,8 @@ ServerSignature Off # ISPConfig Logfile configuration for vlogger ################################################ -SetEnvIf Request_URI "^/datalogstatus.php$" dontlog - LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig -CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig env=!dontlog +CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig AllowOverride None -- GitLab From 53400639bebead70aaae10cf713ee847bab43d56 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sat, 18 Mar 2017 14:04:59 -0600 Subject: [PATCH 164/302] context corrected --- install/tpl/apache_ispconfig.conf.master | 6 +++++- server/conf/apache_ispconfig.conf.master | 6 +++++- server/conf/vhost.conf.master | 9 --------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index 4721979d1e..3e414b4f4f 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -4,7 +4,11 @@ ServerTokens ProductOnly ServerSignature Off - + + +SSLStaplingCache shmcb:/var/run/ocsp(128000) + + ################################################ # ISPConfig Logfile configuration for vlogger diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master index 4721979d1e..3e414b4f4f 100644 --- a/server/conf/apache_ispconfig.conf.master +++ b/server/conf/apache_ispconfig.conf.master @@ -4,7 +4,11 @@ ServerTokens ProductOnly ServerSignature Off - + + +SSLStaplingCache shmcb:/var/run/ocsp(128000) + + ################################################ # ISPConfig Logfile configuration for vlogger diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index cab89e6eef..c8ead10334 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -500,15 +500,6 @@ - - - - - SSLStaplingCache shmcb:/var/run/ocsp(128000) - - - - -- GitLab From f202bcfa0af4b22367917a2b310c07b9e51cbc4b Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 21 Mar 2017 18:09:35 -0600 Subject: [PATCH 165/302] added -l to umount commands --- server/plugins-available/apache2_plugin.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 22d33953f1..cd485bb56a 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -643,7 +643,7 @@ class apache2_plugin { //* Unmount the old log directory bfore we move the log dir //exec('fuser -km '.escapeshellcmd($old_dir.'/log')); - exec('umount '.escapeshellcmd($data['old']['document_root'].'/log')); + exec('umount -l '.escapeshellcmd($data['old']['document_root'].'/log')); //* Create new base directory, if it does not exist yet if(!is_dir($new_dir)) $app->system->mkdirpath($new_dir); @@ -726,7 +726,7 @@ class apache2_plugin { //* Unmount log directory //exec('fuser -km '.escapeshellarg($data['old']['document_root'].'/'.$old_log_folder)); - exec('umount '.escapeshellarg($data['old']['document_root'].'/'.$old_log_folder)); + exec('umount -l '.escapeshellarg($data['old']['document_root'].'/'.$old_log_folder)); } //* Create the log dir if nescessary and mount it @@ -2084,12 +2084,12 @@ class apache2_plugin { foreach($log_folders as $log_folder){ //if($app->system->is_mounted($data['old']['document_root'].'/'.$log_folder)) exec('umount '.escapeshellarg($data['old']['document_root'].'/'.$log_folder)); //exec('fuser -km '.escapeshellarg($data['old']['document_root'].'/'.$log_folder).' 2>/dev/null'); - exec('umount '.escapeshellarg($data['old']['document_root'].'/'.$log_folder).' 2>/dev/null'); + exec('umount -l '.escapeshellarg($data['old']['document_root'].'/'.$log_folder)); } } else { //if($app->system->is_mounted($data['old']['document_root'].'/'.$log_folder)) exec('umount '.escapeshellarg($data['old']['document_root'].'/'.$log_folder)); //exec('fuser -km '.escapeshellarg($data['old']['document_root'].'/'.$log_folder).' 2>/dev/null'); - exec('umount '.escapeshellarg($data['old']['document_root'].'/'.$log_folder).' 2>/dev/null'); + exec('umount -l '.escapeshellarg($data['old']['document_root'].'/'.$log_folder)); } // remove letsencrypt if it exists (renew will always fail otherwise) -- GitLab From 6f306764cb23cd5ee41ce8609563528fe1cd79f1 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 21 Mar 2017 21:11:29 -0600 Subject: [PATCH 166/302] RewriteRule ^ %{REQUEST_URI} is faster than ^(.*)$ $1 --- server/conf/vhost.conf.master | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index c8ead10334..8705db7ebe 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -443,17 +443,17 @@ RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ - RewriteRule ^(.*)$ https://$1 [R=301,NE,L] + RewriteRule ^ https://%{REQUEST_URI} [R=301,NE,L] RewriteCond %{HTTP_HOST} ^$ [NC] RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ - RewriteRule ^(.*)$ https://$1 [R=301,NE,L] + RewriteRule ^ https://%{REQUEST_URI} [R=301,NE,L] - RewriteCond %{HTTP_HOST} $ [NC] + RewriteCond %{HTTP_HOST} $ [NC] RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ @@ -462,8 +462,7 @@ RewriteCond %{REQUEST_URI} !^/php5-fcgi/ RewriteCond %{REQUEST_URI} !^ - - RewriteRule ^/(.*)$ $1 + RewriteRule ^/(.*)$ $1 -- GitLab From 3bf9f0169a06eb1ad6ff70ea6688e3d54e5cd399 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 21 Mar 2017 22:12:17 -0600 Subject: [PATCH 167/302] added stretch --- install/dist/conf/debian90.conf.php | 230 ++++++++++++++++++++++++++++ install/dist/lib/debian90.lib.php | 165 ++++++++++++++++++++ install/lib/install.lib.php | 8 +- 3 files changed, 402 insertions(+), 1 deletion(-) create mode 100644 install/dist/conf/debian90.conf.php create mode 100644 install/dist/lib/debian90.lib.php diff --git a/install/dist/conf/debian90.conf.php b/install/dist/conf/debian90.conf.php new file mode 100644 index 0000000000..01113ed198 --- /dev/null +++ b/install/dist/conf/debian90.conf.php @@ -0,0 +1,230 @@ + diff --git a/install/dist/lib/debian90.lib.php b/install/dist/lib/debian90.lib.php new file mode 100644 index 0000000000..dad45690eb --- /dev/null +++ b/install/dist/lib/debian90.lib.php @@ -0,0 +1,165 @@ +is_update) { + $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); + $ini_array = ini_to_array(stripslashes($tmp['config'])); + // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() + + if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') { + $virtual_transport = 'lmtp:unix:private/dovecot-lmtp'; + $configure_lmtp = true; + } + } + + $config_dir = $conf['postfix']['config_dir']; + if(!$this->get_postfix_service('dovecot', 'unix')) { + //* backup + if(is_file($config_dir.'/master.cf')){ + copy($config_dir.'/master.cf', $config_dir.'/master.cf~2'); + } + if(is_file($config_dir.'/master.cf~')){ + chmod($config_dir.'/master.cf~2', 0400); + } + //* Configure master.cf and add a line for deliver + $content = rf($conf["postfix"]["config_dir"].'/master.cf'); + $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}'."\n"; + af($config_dir.'/master.cf', $deliver_content); + unset($content); + unset($deliver_content); + } + + //* Reconfigure postfix to use dovecot authentication + // Adding the amavisd commands to the postfix configuration + $postconf_commands = array ( + 'dovecot_destination_recipient_limit = 1', + 'virtual_transport = '.$virtual_transport, + 'smtpd_sasl_type = dovecot', + 'smtpd_sasl_path = private/auth' + ); + + // Make a backup copy of the main.cf file + copy($conf["postfix"]["config_dir"].'/main.cf', $conf["postfix"]["config_dir"].'/main.cf~3'); + + // Executing the postconf commands + foreach($postconf_commands as $cmd) { + $command = "postconf -e '$cmd'"; + caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } + + //* copy dovecot.conf + $config_dir = $conf['dovecot']['config_dir']; + $configfile = 'dovecot.conf'; + if(is_file($config_dir.'/'.$configfile)){ + copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~'); + } + + //* Get the dovecot version + exec('dovecot --version', $tmp); + $dovecot_version = $tmp[0]; + unset($tmp); + + //* Copy dovecot configuration file + if(version_compare($dovecot_version,2) >= 0) { + if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master')) { + copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile); + } else { + copy('tpl/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile); + } + replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0); + if(version_compare($dovecot_version,2.1) < 0) { + removeLine($config_dir.'/'.$configfile, 'ssl_protocols ='); + } + } else { + if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master')) { + copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master', $config_dir.'/'.$configfile); + } else { + copy('tpl/debian6_dovecot.conf.master', $config_dir.'/'.$configfile); + } + } + + //* dovecot-lmtpd + if($configure_lmtp) { + replaceLine($config_dir.'/'.$configfile, 'protocols = imap pop3', 'protocols = imap pop3 lmtp', 1, 0); + } + + //* dovecot-sql.conf + $configfile = 'dovecot-sql.conf'; + if(is_file($config_dir.'/'.$configfile)){ + copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~'); + chmod($config_dir.'/'.$configfile.'~', 0400); + } + $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot-sql.conf.master', 'tpl/debian6_dovecot-sql.conf.master'); + $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content); + $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); + $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); + $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); + $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); + $content = str_replace('{server_id}', $conf['server_id'], $content); + wf($config_dir.'/'.$configfile, $content); + + chmod($config_dir.'/'.$configfile, 0600); + chown($config_dir.'/'.$configfile, 'root'); + chgrp($config_dir.'/'.$configfile, 'root'); + + // Dovecot shall ignore mounts in website directory + if(is_installed('doveadm')) exec("doveadm mount add '/var/www/*' ignore > /dev/null 2> /dev/null"); + + } + + public function configure_apache() { + global $conf; + + if(file_exists('/etc/apache2/mods-available/fcgid.conf')) replaceLine('/etc/apache2/mods-available/fcgid.conf', 'MaxRequestLen', 'MaxRequestLen 15728640', 0, 1); + + parent::configure_apache(); + } + + public function configure_fail2ban() { + /* + copy('tpl/dovecot-pop3imap.conf.master',"/etc/fail2ban/filter.d/dovecot-pop3imap.conf"); + copy('tpl/dovecot_fail2ban_jail.local.master','/etc/fail2ban/jail.local'); + */ + } + +} + +?> diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 2f601e31c3..c1af0fd700 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -204,10 +204,16 @@ function get_distname() { $distid = 'debian60'; $distbaseid = 'debian'; swriteln("Operating System: Debian 8.0 (Jessie) or compatible\n"); + } elseif(substr(trim(file_get_contents('/etc/debian_version')),0,1) == '9') { + $distname = 'Debian'; + $distver = 'Stretch'; + $distid = 'debian90'; + $distbaseid = 'debian'; + swriteln("Operating System: Debian 9.x (Stretch) or compatible\n"); } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; - $distid = 'debian60'; + $distid = 'debian90'; $distconfid = 'debiantesting'; $distbaseid = 'debian'; swriteln("Operating System: Debian Testing\n"); -- GitLab From f81fa588851fe49c18f17d01be119c7c3577053f Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 21 Mar 2017 22:16:23 -0600 Subject: [PATCH 168/302] localhost --- install/dist/conf/debian90.conf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dist/conf/debian90.conf.php b/install/dist/conf/debian90.conf.php index 01113ed198..ef4996b2fe 100644 --- a/install/dist/conf/debian90.conf.php +++ b/install/dist/conf/debian90.conf.php @@ -56,7 +56,7 @@ $conf['services']['firewall'] = false; $conf['mysql']['installed'] = false; // will be detected automatically during installation $conf['mysql']['init_script'] = 'mysql'; $conf['mysql']['host'] = 'localhost'; -$conf['mysql']['ip'] = 'localhost'; //this adds IPv6 and IPv4 connectivity +$conf['mysql']['ip'] = '127.0.0.1'; $conf['mysql']['port'] = '3306'; $conf['mysql']['database'] = 'dbispconfig'; $conf['mysql']['admin_user'] = 'root'; -- GitLab From 97657c77bfc6f5329d504ffe934f9d2827caf686 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 22 Mar 2017 09:04:29 +0100 Subject: [PATCH 169/302] Update vhost.conf.master --- server/conf/vhost.conf.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 8705db7ebe..6c2f0b3122 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -462,7 +462,7 @@ RewriteCond %{REQUEST_URI} !^/php5-fcgi/ RewriteCond %{REQUEST_URI} !^ - RewriteRule ^/(.*)$ $1 + RewriteRule /(.*) $1 -- GitLab From 83a76f24923f2eb870eeca0c20780d4e3c66bf9e Mon Sep 17 00:00:00 2001 From: Maanus Kask Date: Wed, 22 Mar 2017 13:21:28 +0200 Subject: [PATCH 170/302] Fix for Issue #4363 - dns_templatezone_add not working --- interface/lib/classes/remote.d/dns.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index b95e74f768..a4e9fca013 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -71,6 +71,7 @@ class remoting_dns extends remoting { $tpl_rows = explode("\n", $tpl_content); $section = ''; $vars = array(); + $vars['xfer']=''; $dns_rr = array(); foreach($tpl_rows as $row) { $row = trim($row); @@ -176,6 +177,7 @@ class remoting_dns extends remoting { $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); } } + return $dns_soa_id; exit; } else { throw new SoapFault('permission_denied', $error); -- GitLab From 03abe35250adb85829f6344240c170d23e33488a Mon Sep 17 00:00:00 2001 From: Luis Date: Fri, 24 Mar 2017 23:58:23 +0100 Subject: [PATCH 171/302] Resolve Rewrite HTTP to HTTPS: https://git.ispconfig.org/ispconfig/ispconfig3/issues/4601 --- server/conf/vhost.conf.master | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index c8ead10334..4e78cb8781 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -438,6 +438,15 @@ RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/ RewriteRule ^ - [END] + + + + RewriteCond %{HTTPS} off + RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ + + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + + RewriteCond %{HTTP_HOST} ^$ [NC] @@ -466,15 +475,6 @@ RewriteRule ^/(.*)$ $1 - - - - RewriteCond %{HTTPS} off - RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ - - RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] - - # add support for apache mpm_itk -- GitLab From 4af8750f88cfc85022fc2e25a938a32793134b2d Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sat, 25 Mar 2017 23:49:49 -0600 Subject: [PATCH 172/302] added setting --- install/lib/installer_base.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 05ff5e4483..e0b4822930 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1552,6 +1552,8 @@ class installer_base { exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; printf '\n'; done 2>&1 >$config_dir/conf/.backup~"); //* clean common unused settings exec("rm $config_dir/conf/MinUID $config_dir/conf/PAMAuthentication $config_dir/conf/PureDB $config_dir/conf/UnixAuthentication 2> /dev/null"); + //* required for ftp traffic stats + file_put_contents("$config_dir/conf/AltLog","clf:/var/log/pure-ftpd/transfer.log"); //* improves client compatibility file_put_contents("$config_dir/conf/BrokenClientsCompatibility","yes"); //* needed for ispconfig implementation -- GitLab From 635f4f86f740ad7eed910014512aa699d26d7af7 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sun, 26 Mar 2017 18:26:20 -0600 Subject: [PATCH 173/302] added better log format for stats --- install/tpl/apache_ispconfig.conf.master | 4 ++++ server/conf/apache_ispconfig.conf.master | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index 3e414b4f4f..24fb9dc285 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -14,7 +14,11 @@ SSLStaplingCache shmcb:/var/run/ocsp(128000) # ISPConfig Logfile configuration for vlogger ################################################ + +LogFormat "%v %h %l %u %t \"%r\" %>s %S \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig + LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig + CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master index 3e414b4f4f..24fb9dc285 100644 --- a/server/conf/apache_ispconfig.conf.master +++ b/server/conf/apache_ispconfig.conf.master @@ -14,7 +14,11 @@ SSLStaplingCache shmcb:/var/run/ocsp(128000) # ISPConfig Logfile configuration for vlogger ################################################ + +LogFormat "%v %h %l %u %t \"%r\" %>s %S \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig + LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig + CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig -- GitLab From b8610bb64847db98ec7cb699b31980ab02bbf8ae Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 27 Mar 2017 02:25:29 -0600 Subject: [PATCH 174/302] mkdir for letsencrypt --- server/plugins-available/apache2_plugin.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index cd485bb56a..27a38ba802 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1218,12 +1218,13 @@ class apache2_plugin { // prevent duplicate $temp_domains = array_unique($temp_domains); - + // check if domains are reachable to avoid letsencrypt verification errors $le_rnd_file = uniqid('le-') . '.txt'; $le_rnd_hash = md5(uniqid('le-', true)); + mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',755,true); file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); - + $le_domains = array(); foreach($temp_domains as $temp_domain) { $le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file)); -- GitLab From 81b322d9de62d7ef55be62a5ecbfc52e1a0417d1 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 27 Mar 2017 02:54:58 -0600 Subject: [PATCH 175/302] 0750 --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 27a38ba802..2556468674 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1222,7 +1222,7 @@ class apache2_plugin { // check if domains are reachable to avoid letsencrypt verification errors $le_rnd_file = uniqid('le-') . '.txt'; $le_rnd_hash = md5(uniqid('le-', true)); - mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',755,true); + mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0750,true); file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); $le_domains = array(); -- GitLab From 95a7d94933eb4177b648d6e92034f68fb3e9086f Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 27 Mar 2017 10:56:47 +0200 Subject: [PATCH 176/302] Update apache_ispconfig.conf.master --- server/conf/apache_ispconfig.conf.master | 4 ---- 1 file changed, 4 deletions(-) diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master index 24fb9dc285..3e414b4f4f 100644 --- a/server/conf/apache_ispconfig.conf.master +++ b/server/conf/apache_ispconfig.conf.master @@ -14,11 +14,7 @@ SSLStaplingCache shmcb:/var/run/ocsp(128000) # ISPConfig Logfile configuration for vlogger ################################################ - -LogFormat "%v %h %l %u %t \"%r\" %>s %S \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig - LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig - CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig -- GitLab From 9b3d87b72f010c321536f35b0f4bac4f7f0dbc6f Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 27 Mar 2017 10:57:11 +0200 Subject: [PATCH 177/302] Update apache_ispconfig.conf.master --- install/tpl/apache_ispconfig.conf.master | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index 24fb9dc285..3e414b4f4f 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -14,11 +14,7 @@ SSLStaplingCache shmcb:/var/run/ocsp(128000) # ISPConfig Logfile configuration for vlogger ################################################ - -LogFormat "%v %h %l %u %t \"%r\" %>s %S \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig - LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig - CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig -- GitLab From 3e9a63c3965fdd12fb8e456b281a2a69053defa3 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 27 Mar 2017 13:25:41 -0600 Subject: [PATCH 178/302] stretch added --- server/lib/classes/monitor_tools.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 2b0252212d..2d0b391ab8 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -193,10 +193,15 @@ class monitor_tools { $distver = 'Jessie'; $distid = 'debian60'; $distbaseid = 'debian'; + } elseif(substr(trim(file_get_contents('/etc/debian_version')),0,1) == '9') { + $distname = 'Debian'; + $distver = 'Stretch'; + $distid = 'debian90'; + $distbaseid = 'debian'; } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; - $distid = 'debian60'; + $distid = 'debian90'; $distconfid = 'debiantesting'; $distbaseid = 'debian'; } else { -- GitLab From 70396c578230bddd8e43dc27e0302e07645a47c3 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 27 Mar 2017 14:48:35 -0600 Subject: [PATCH 179/302] create directories for letsencrypt --- server/plugins-available/apache2_plugin.inc.php | 2 +- server/plugins-available/nginx_plugin.inc.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 2556468674..0265c34202 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1222,7 +1222,7 @@ class apache2_plugin { // check if domains are reachable to avoid letsencrypt verification errors $le_rnd_file = uniqid('le-') . '.txt'; $le_rnd_hash = md5(uniqid('le-', true)); - mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0750,true); + if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true); file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); $le_domains = array(); diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 55d2b19151..d114519f62 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1295,8 +1295,9 @@ class nginx_plugin { // check if domains are reachable to avoid letsencrypt verification errors $le_rnd_file = uniqid('le-') . '.txt'; $le_rnd_hash = md5(uniqid('le-', true)); + if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true); file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); - + $le_domains = array(); foreach($temp_domains as $temp_domain) { $le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file)); -- GitLab From d6d2c16e35c71d509888d3af58d483812597ce23 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 29 Mar 2017 20:16:14 -0600 Subject: [PATCH 180/302] vlogger for more precise stats with %O for apache >=2.5 --- install/tpl/apache_ispconfig.conf.master | 4 ++++ server/conf/apache_ispconfig.conf.master | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index 3e414b4f4f..90db9c1e25 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -14,7 +14,11 @@ SSLStaplingCache shmcb:/var/run/ocsp(128000) # ISPConfig Logfile configuration for vlogger ################################################ + +LogFormat '%v %h %l %u %t "%r" %>s %S "%{Referer}i" "%{User-Agent}i"' combined_ispconfig + LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig + CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig diff --git a/server/conf/apache_ispconfig.conf.master b/server/conf/apache_ispconfig.conf.master index 3e414b4f4f..90db9c1e25 100644 --- a/server/conf/apache_ispconfig.conf.master +++ b/server/conf/apache_ispconfig.conf.master @@ -14,7 +14,11 @@ SSLStaplingCache shmcb:/var/run/ocsp(128000) # ISPConfig Logfile configuration for vlogger ################################################ + +LogFormat '%v %h %l %u %t "%r" %>s %S "%{Referer}i" "%{User-Agent}i"' combined_ispconfig + LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig + CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig -- GitLab From 00e21ca3f176923ed6a01f9f134543383e90017d Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Wed, 29 Mar 2017 21:12:13 -0600 Subject: [PATCH 181/302] cancel to right location --- interface/web/dns/templates/dns_a_edit.htm | 2 +- interface/web/dns/templates/dns_aaaa_edit.htm | 2 +- interface/web/dns/templates/dns_alias_edit.htm | 2 +- interface/web/dns/templates/dns_cname_edit.htm | 2 +- interface/web/dns/templates/dns_dkim_edit.htm | 2 +- interface/web/dns/templates/dns_dmarc_edit.htm | 2 +- interface/web/dns/templates/dns_ds_edit.htm | 2 +- interface/web/dns/templates/dns_hinfo_edit.htm | 2 +- interface/web/dns/templates/dns_loc_edit.htm | 2 +- interface/web/dns/templates/dns_mx_edit.htm | 2 +- interface/web/dns/templates/dns_ns_edit.htm | 2 +- interface/web/dns/templates/dns_ptr_edit.htm | 2 +- interface/web/dns/templates/dns_rp_edit.htm | 2 +- interface/web/dns/templates/dns_spf_edit.htm | 2 +- interface/web/dns/templates/dns_srv_edit.htm | 2 +- interface/web/dns/templates/dns_tlsa_edit.htm | 2 +- interface/web/dns/templates/dns_txt_edit.htm | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/interface/web/dns/templates/dns_a_edit.htm b/interface/web/dns/templates/dns_a_edit.htm index 92dfbcd3ae..a0b678ed78 100644 --- a/interface/web/dns/templates/dns_a_edit.htm +++ b/interface/web/dns/templates/dns_a_edit.htm @@ -29,7 +29,7 @@
- +
+ + diff --git a/server/conf/bind_pri.domain.master b/server/conf/bind_pri.domain.master index ed395064af..29badac7ac 100644 --- a/server/conf/bind_pri.domain.master +++ b/server/conf/bind_pri.domain.master @@ -20,6 +20,9 @@ $TTL {tmpl_var name='ttl'} {tmpl_var name='name'} {tmpl_var name='ttl'} CNAME {tmpl_var name='data'} + +{tmpl_var name='name'} {tmpl_var name='ttl'} CAA 0 {tmpl_var name='data'} + {tmpl_var name='name'} {tmpl_var name='ttl'} CNAME {tmpl_var name='data'} @@ -53,5 +56,8 @@ $TTL {tmpl_var name='ttl'} {tmpl_var name='name'} {tmpl_var name='ttl'} TXT "{tmpl_var name='data'}" + +{tmpl_var name='name'} {tmpl_var name='ttl'} TYPE257 {tmpl_var name='data'} + diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 23856f0c86..c00146f228 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -236,6 +236,17 @@ class bind_plugin { //* load the server configuration options $dns_config = $app->getconf->get_server_config($conf["server_id"], 'dns'); + //* Get the bind version + $bind_caa = false; + $bind = explode("\n", shell_exec('which named bind')); + $bind = reset($bind); + if(is_executable($bind)) { + exec($bind . ' -v 2>&1', $tmp); + $bind_caa = @(version_compare($tmp[0],"BIND 9.9.6", '>='))?true:false; + unset($tmp); + } + unset($bind); + //* Write the domain file if(!empty($data['new']['id'])) { $tpl = new tpl(); @@ -253,6 +264,20 @@ class bind_plugin { if($records[$i]['type'] == 'TXT' && strlen($records[$i]['data']) > 255) { $records[$i]['data'] = implode('" "',str_split( $records[$i]['data'], 255)); } + //* CAA-Records - Type257 for older bind-versions + if($records[$i]['type'] == 'CAA' && !$bind_caa) { + $records[$i]['type'] = 'TYPE257'; + $temp = explode(' ', $records[$i]['data']); + unset($temp[0]); + $records[$i]['data'] = implode(' ', $temp); + $data_new = str_replace(array('"', ' '), '', $records[$i]['data']); + //TODO: check if need \t and 00 + $hex = unpack('H*', "\t$data_new"); + $hex[1] = '00'.$hex[1]; + $length = strlen($hex[1])/2; + $data_new = "\# $length $hex[1]"; + $records[$i]['data'] = $data_new; + } } } $tpl->setLoop('zones', $records); -- GitLab From ed1a300304c4e0be8b9714328f33c6404098d2ed Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Wed, 17 May 2017 12:13:13 +0200 Subject: [PATCH 203/302] fixed sql for dns_caa --- install/sql/incremental/upd_dev_collection.sql | 7 ++++--- install/sql/ispconfig3.sql | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index adfb99c731..36040b0d9c 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -31,7 +31,7 @@ CHANGE `warnbannedrecip` `warnbannedrecip` ENUM('N','Y') CHARACTER SET utf8 COLL CHANGE `warnbadhrecip` `warnbadhrecip` ENUM('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N'; CREATE TABLE IF NOT EXISTS `dns_ssl_ca` ( - `id` int(10) unsigned NOT AUTO_INCREMENT, + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `sys_userid` int(11) unsigned NOT NULL DEFAULT '0', `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0', `sys_perm_user` varchar(5) NOT NULL DEFAULT '', @@ -42,8 +42,9 @@ CREATE TABLE IF NOT EXISTS `dns_ssl_ca` ( `ca_issue` varchar(255) NOT NULL DEFAULT '', `ca_wildcard` enum('Y','N') NOT NULL DEFAULT 'N', `ca_iodef` text NOT NULL, - `ca_critical` tinyint(1) NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; + `ca_critical` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Comodo', 'comodoca.com', 'Y', '', 0), diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 3021873dc1..e543f6d31c 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -507,7 +507,7 @@ CREATE TABLE `dns_rr` ( -- CREATE TABLE IF NOT EXISTS `dns_ssl_ca` ( - `id` int(10) unsigned NOT AUTO_INCREMENT, + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `sys_userid` int(11) unsigned NOT NULL DEFAULT '0', `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0', `sys_perm_user` varchar(5) NOT NULL DEFAULT '', @@ -518,8 +518,9 @@ CREATE TABLE IF NOT EXISTS `dns_ssl_ca` ( `ca_issue` varchar(255) NOT NULL DEFAULT '', `ca_wildcard` enum('Y','N') NOT NULL DEFAULT 'N', `ca_iodef` text NOT NULL, - `ca_critical` tinyint(1) NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; + `ca_critical` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Comodo', 'comodoca.com', 'Y', '', 0), -- GitLab From 934455246bb1fa8dbe21c7e99f5f1d937fc3de51 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Wed, 17 May 2017 12:19:41 +0200 Subject: [PATCH 204/302] typo --- interface/web/admin/form/system_config.tform.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php index d48f9c8628..9e00f29f89 100644 --- a/interface/web/admin/form/system_config.tform.php +++ b/interface/web/admin/form/system_config.tform.php @@ -653,11 +653,11 @@ $form['tabs']['dns_ca'] = array ( 'fields' => array (), 'plugins' => array ( 'dns_ca' => array ( - 'class' => 'plugin_dns_ca', + 'class' => 'plugin_system_config_dns_ca', 'options' => array() ), 'dns_ca_list' => array ( - 'class' => 'plugin_dns_ca_list', + 'class' => 'plugin_system_config_dns_ca_list', 'options' => array() ) ) -- GitLab From 0359911f6c5942ac96c7ffdc39d7bf53cae8952d Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Wed, 17 May 2017 14:35:38 +0200 Subject: [PATCH 205/302] update caa-server-plugin --- server/plugins-available/bind_plugin.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index c00146f228..edf7b93d9f 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -271,9 +271,8 @@ class bind_plugin { unset($temp[0]); $records[$i]['data'] = implode(' ', $temp); $data_new = str_replace(array('"', ' '), '', $records[$i]['data']); - //TODO: check if need \t and 00 - $hex = unpack('H*', "\t$data_new"); - $hex[1] = '00'.$hex[1]; + $hex = unpack('H*', $data_new); + $hex[1] = '0005'.strtoupper($hex[1]); $length = strlen($hex[1])/2; $data_new = "\# $length $hex[1]"; $records[$i]['data'] = $data_new; -- GitLab From 1e52ceb5312988b3810a5349cf78f78fae4a0050 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Thu, 18 May 2017 09:00:56 +0200 Subject: [PATCH 206/302] fixed caa-lng --- interface/web/dns/lib/lang/ar_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/bg_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/br_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/ca_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/cz_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/de_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/dk_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/el_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/en_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/es_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/fi_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/fr_dns_caa.lng | 19 +++++++++++++++++++ interface/web/dns/lib/lang/hr_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/hu_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/id_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/it_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/ja_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/nl_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/pl_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/pt_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/ro_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/ru_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/se_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/sk_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/tr_dns_caa.lng | 4 ++-- 25 files changed, 67 insertions(+), 48 deletions(-) create mode 100644 interface/web/dns/lib/lang/fr_dns_caa.lng diff --git a/interface/web/dns/lib/lang/ar_dns_caa.lng b/interface/web/dns/lib/lang/ar_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/ar_dns_caa.lng +++ b/interface/web/dns/lib/lang/ar_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/bg_dns_caa.lng b/interface/web/dns/lib/lang/bg_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/bg_dns_caa.lng +++ b/interface/web/dns/lib/lang/bg_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/br_dns_caa.lng b/interface/web/dns/lib/lang/br_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/br_dns_caa.lng +++ b/interface/web/dns/lib/lang/br_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/ca_dns_caa.lng b/interface/web/dns/lib/lang/ca_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/ca_dns_caa.lng +++ b/interface/web/dns/lib/lang/ca_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/cz_dns_caa.lng b/interface/web/dns/lib/lang/cz_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/cz_dns_caa.lng +++ b/interface/web/dns/lib/lang/cz_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/de_dns_caa.lng b/interface/web/dns/lib/lang/de_dns_caa.lng index 40f6d17816..88dbf6e47a 100644 --- a/interface/web/dns/lib/lang/de_dns_caa.lng +++ b/interface/web/dns/lib/lang/de_dns_caa.lng @@ -2,9 +2,9 @@ $wb['ca_list_txt'] = 'Zertifizierungsstelle'; $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'zusätzliche Hostnamen'; -$wb['ca_hostname_note_txt'] = '(mit Komma getrennte Liste)'; +$wb['ca_hostname_note_txt'] = '(mit Komma getrennte Liste - leer für alle Namen)'; $wb['ca_options_txt'] = 'zusätzliche Angaben'; -$wb['ca_options_note_txt'] = 'von der Zertifizierungsstelle vorgegeben (mit Komma getrennte Liste - leer für alle Namen)'; +$wb['ca_options_note_txt'] = 'von der Zertifizierungsstelle vorgegeben (mit Komma getrennte Liste)'; $wb['ca_wildcard_txt'] = 'Wildcard verwenden'; $wb['ca_critical_txt'] = 'Strikte Überprüfung durch die Zertifizierungsstelle'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; diff --git a/interface/web/dns/lib/lang/dk_dns_caa.lng b/interface/web/dns/lib/lang/dk_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/dk_dns_caa.lng +++ b/interface/web/dns/lib/lang/dk_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/el_dns_caa.lng b/interface/web/dns/lib/lang/el_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/el_dns_caa.lng +++ b/interface/web/dns/lib/lang/el_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/en_dns_caa.lng b/interface/web/dns/lib/lang/en_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/en_dns_caa.lng +++ b/interface/web/dns/lib/lang/en_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/es_dns_caa.lng b/interface/web/dns/lib/lang/es_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/es_dns_caa.lng +++ b/interface/web/dns/lib/lang/es_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/fi_dns_caa.lng b/interface/web/dns/lib/lang/fi_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/fi_dns_caa.lng +++ b/interface/web/dns/lib/lang/fi_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/fr_dns_caa.lng b/interface/web/dns/lib/lang/fr_dns_caa.lng new file mode 100644 index 0000000000..21c02359f0 --- /dev/null +++ b/interface/web/dns/lib/lang/fr_dns_caa.lng @@ -0,0 +1,19 @@ + diff --git a/interface/web/dns/lib/lang/hr_dns_caa.lng b/interface/web/dns/lib/lang/hr_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/hr_dns_caa.lng +++ b/interface/web/dns/lib/lang/hr_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/hu_dns_caa.lng b/interface/web/dns/lib/lang/hu_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/hu_dns_caa.lng +++ b/interface/web/dns/lib/lang/hu_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/id_dns_caa.lng b/interface/web/dns/lib/lang/id_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/id_dns_caa.lng +++ b/interface/web/dns/lib/lang/id_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/it_dns_caa.lng b/interface/web/dns/lib/lang/it_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/it_dns_caa.lng +++ b/interface/web/dns/lib/lang/it_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/ja_dns_caa.lng b/interface/web/dns/lib/lang/ja_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/ja_dns_caa.lng +++ b/interface/web/dns/lib/lang/ja_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/nl_dns_caa.lng b/interface/web/dns/lib/lang/nl_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/nl_dns_caa.lng +++ b/interface/web/dns/lib/lang/nl_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/pl_dns_caa.lng b/interface/web/dns/lib/lang/pl_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/pl_dns_caa.lng +++ b/interface/web/dns/lib/lang/pl_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/pt_dns_caa.lng b/interface/web/dns/lib/lang/pt_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/pt_dns_caa.lng +++ b/interface/web/dns/lib/lang/pt_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/ro_dns_caa.lng b/interface/web/dns/lib/lang/ro_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/ro_dns_caa.lng +++ b/interface/web/dns/lib/lang/ro_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/ru_dns_caa.lng b/interface/web/dns/lib/lang/ru_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/ru_dns_caa.lng +++ b/interface/web/dns/lib/lang/ru_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/se_dns_caa.lng b/interface/web/dns/lib/lang/se_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/se_dns_caa.lng +++ b/interface/web/dns/lib/lang/se_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/sk_dns_caa.lng b/interface/web/dns/lib/lang/sk_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/sk_dns_caa.lng +++ b/interface/web/dns/lib/lang/sk_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; diff --git a/interface/web/dns/lib/lang/tr_dns_caa.lng b/interface/web/dns/lib/lang/tr_dns_caa.lng index e050e85d9f..21c02359f0 100644 --- a/interface/web/dns/lib/lang/tr_dns_caa.lng +++ b/interface/web/dns/lib/lang/tr_dns_caa.lng @@ -4,9 +4,9 @@ $wb['ca_domain_txt'] = 'Domain'; $wb['ca_hostname_txt'] = 'additinal Hostnamen'; $wb['ca_hostname_note_txt'] = '(Sepearated list with commas - empty for all hostnames)'; $wb['ca_options_txt'] = 'additional options'; -$wb['ca_options_note_txt'] = 'requested by the CA)'; +$wb['ca_options_note_txt'] = 'requested by the CA (Sepearated list with commas)'; $wb['ca_wildcard_txt'] = 'Use Wildcard SSL'; -$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CA’s do not recognize any other flag values as described in RFC 6844 +$wb['ca_critical_txt'] = 'Strict check'; //For future use. At this time, CAAs do not recognize any other flag values as described in RFC 6844 $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; $wb['select_txt'] = 'Select Certifiction Authority'; -- GitLab From 6429d9293c8c711fff16c7cec69dc61530cb99f7 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Fri, 19 May 2017 11:25:38 +0200 Subject: [PATCH 207/302] allow active / inactive for caa :) --- interface/web/dns/dns_caa_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/dns_caa_edit.php b/interface/web/dns/dns_caa_edit.php index 40e580b0a4..c3d8618414 100644 --- a/interface/web/dns/dns_caa_edit.php +++ b/interface/web/dns/dns_caa_edit.php @@ -172,7 +172,7 @@ class page_action extends tform_actions { } // Check for duplicate - $temp = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE type = 'CAA' AND name = ? AND data = ?", $this->dataRecord['name'], $this->dataRecord['data']); + $temp = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE type = 'CAA' AND name = ? AND data = ? AND active = ?", $this->dataRecord['name'], $this->dataRecord['data'], $POST['active']); if(is_array($temp)) $this->error('caa_exists_error'); unset($temp); -- GitLab From a2c30baa6ff1e24f4fe3427041809049c2e439ef Mon Sep 17 00:00:00 2001 From: Hubert Garrido Date: Mon, 22 May 2017 16:10:56 +0200 Subject: [PATCH 208/302] small responsive update, don't force width on select2 elements --- interface/web/themes/default/assets/javascripts/ispconfig.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index 881dfb2c10..d3339ba26a 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -86,7 +86,6 @@ var ISPConfig = { if(ISPConfig.options.useComboBox == true) { $('#sidebar').find("select:not(.chosen-select)").select2({ placeholder: '', - width: 'element', selectOnBlur: true, allowClear: true }); @@ -100,7 +99,6 @@ var ISPConfig = { if(ISPConfig.options.useComboBox == true) { $('#pageContent').find("select:not(.chosen-select)").select2({ placeholder: '', - width: 'element', selectOnBlur: true, allowClear: true, formatResult: function(o) { -- GitLab From b81b189988d75a59ffc858ae656ddc292ad20e2b Mon Sep 17 00:00:00 2001 From: AndyPL Date: Thu, 25 May 2017 15:13:00 +0200 Subject: [PATCH 209/302] Update pl.lng --- interface/web/login/lib/lang/pl.lng | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/web/login/lib/lang/pl.lng b/interface/web/login/lib/lang/pl.lng index 702b50117f..da43327d51 100644 --- a/interface/web/login/lib/lang/pl.lng +++ b/interface/web/login/lib/lang/pl.lng @@ -21,14 +21,14 @@ $wb['pw_button_txt'] = 'Prześlij hasło ponownie'; $wb['email_txt'] = 'E-mail'; $wb['error_maintenance_mode'] = 'Ta instalacja ISPConfig jest aktualnie w trakcje modernizacji. Wracamy niebawem - proszę o cierpliwość.'; $wb['theme_not_compatible'] = 'Wybrany temat nie jest kompatybilny z aktualną wersją ISPConfig. Proszę wybrać nową wersję tematu.
Został aktywowany automatycznie domyślny temat.'; -$wb['back_txt'] = 'Back'; -$wb['email_error'] = 'Email contains unallowed characters or has a invalid format.'; -$wb['stay_logged_in_txt'] = 'Keep me logged in'; -$wb['lost_password_function_disabled_txt'] = 'The lost password function is not available for this user.'; -$wb['pw_reset_act'] = 'You have been sent an activation link. Please visit the link to confirm your password request.'; +$wb['back_txt'] = 'Wstecz'; +$wb['email_error'] = 'E-mail zawiera niedozwolone znaki lub ma nieprawidłowy format.'; +$wb['stay_logged_in_txt'] = 'Pozostaw mnie zalogowanym'; +$wb['lost_password_function_disabled_txt'] = 'Funkcja utraconego hasła nie jest dostępna dla tego użytkownika.'; +$wb['pw_reset_act'] = 'Został wysłany link aktywacyjny. Przejdź do linku, aby potwierdzić prośbę o podanie hasła.'; $wb['pw_reset_act_mail_title'] = 'Confirm ISPConfig 3 Control panel password reset'; $wb['pw_reset_act_mail_msg'] = 'Please confirm that your want to reset your ISPConfig 3 control panel account password by visiting the following activation link: '; -$wb['lost_password_function_wait_txt'] = 'You cannot request a new password, yet. Please wait a few minutes.'; -$wb['lost_password_function_expired_txt'] = 'This activation link has expired. Please request a new one.'; -$wb['lost_password_function_denied_txt'] = 'This activation link is not valid.'; +$wb['lost_password_function_wait_txt'] = 'Nie możesz jeszcze zażądać nowego hasła. Poczekaj kilka minut.'; +$wb['lost_password_function_expired_txt'] = 'Link aktywacyjny wygasł. Poproś o nowy.'; +$wb['lost_password_function_denied_txt'] = 'Ten link aktywacyjny jest nieprawidłowy.'; ?> -- GitLab From ece1c45cd4eebabe388a0c661cecbbf400d11a6e Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Sun, 28 May 2017 11:43:24 +0200 Subject: [PATCH 210/302] dns_caa.lng --- interface/web/dns/lib/lang/ar_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/bg_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/br_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/ca_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/cz_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/dk_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/el_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/en_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/es_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/fi_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/fr_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/hr_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/hu_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/id_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/it_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/ja_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/nl_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/pl_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/pt_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/ro_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/ru_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/se_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/sk_dns_caa.lng | 4 ++-- interface/web/dns/lib/lang/tr_dns_caa.lng | 4 ++-- 24 files changed, 48 insertions(+), 48 deletions(-) diff --git a/interface/web/dns/lib/lang/ar_dns_caa.lng b/interface/web/dns/lib/lang/ar_dns_caa.lng index 21c02359f0..1fa7dcb7d5 100644 --- a/interface/web/dns/lib/lang/ar_dns_caa.lng +++ b/interface/web/dns/lib/lang/ar_dns_caa.lng @@ -1,9 +1,9 @@ Date: Tue, 30 May 2017 10:42:19 +0200 Subject: [PATCH 211/302] Resign should also take place if ISPC Master is not the Nameserver. We do only trigger a rewrite of the zonefile by touching server log so no need to chank against existance of a file. Thanks to Tom Albers who pointed me to this issue by providing an excellent bug report! Also removed some garbage --- server/lib/classes/cron.d/550-bind_dnssec.inc.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/lib/classes/cron.d/550-bind_dnssec.inc.php b/server/lib/classes/cron.d/550-bind_dnssec.inc.php index ed831ea910..7f917b64e0 100644 --- a/server/lib/classes/cron.d/550-bind_dnssec.inc.php +++ b/server/lib/classes/cron.d/550-bind_dnssec.inc.php @@ -82,18 +82,13 @@ class cronjob_bind_dnssec extends cronjob { //* Load libraries $app->uses("getconf,tpl"); - - //* load the server configuration options - $dns_config = $app->getconf->get_server_config($conf["server_id"], 'dns'); //TODO : change this when distribution information has been integrated into server record $filespre = (file_exists('/etc/gentoo-release')) ? 'pri/' : 'pri.'; - $soas = $app->db->queryAllRecords("SELECT id,serial,origin FROM dns_soa WHERE server_id = ? AND active= 'Y' AND dnssec_wanted = 'Y' AND dnssec_initialized = 'Y' AND (dnssec_last_signed < ? OR dnssec_last_signed > ?)", $conf['server_id'], time()-(3600*24*5)+900, time()+900); //Resign zones every 5 days (expiry is 16 days so we have enough safety, 15 minutes tolerance) + $soas = $app->db->queryAllRecords("SELECT id,serial,origin FROM dns_soa WHERE active= 'Y' AND dnssec_wanted = 'Y' AND dnssec_initialized = 'Y' AND (dnssec_last_signed < ? OR dnssec_last_signed > ?)", time()-(3600*24*5)+900, time()+900); //Resign zones every 5 days (expiry is 16 days so we have enough safety, 15 minutes tolerance) foreach ($soas as $data) { $domain = substr($data['origin'], 0, strlen($data['origin'])-1); - if (!file_exists($dns_config['bind_zonefiles_dir'].'/'.$filespre.$domain)) continue; - $app->log('DNSSEC Auto-Resign: Touching zone '.$domain, LOGLEVEL_DEBUG); $app->db->datalogUpdate('dns_soa', array("serial" => $this->increase_serial($data['serial'])), 'id', $data['id']); } -- GitLab From fe784c50bf374d96d69300549b9e6c900d1ba98c Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Fri, 16 Jun 2017 09:57:20 +0200 Subject: [PATCH 212/302] - removed unneeded file --- install/dist/lib/debian90.lib.php | 165 ------------------------------ 1 file changed, 165 deletions(-) delete mode 100644 install/dist/lib/debian90.lib.php diff --git a/install/dist/lib/debian90.lib.php b/install/dist/lib/debian90.lib.php deleted file mode 100644 index dad45690eb..0000000000 --- a/install/dist/lib/debian90.lib.php +++ /dev/null @@ -1,165 +0,0 @@ -is_update) { - $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); - $ini_array = ini_to_array(stripslashes($tmp['config'])); - // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() - - if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') { - $virtual_transport = 'lmtp:unix:private/dovecot-lmtp'; - $configure_lmtp = true; - } - } - - $config_dir = $conf['postfix']['config_dir']; - if(!$this->get_postfix_service('dovecot', 'unix')) { - //* backup - if(is_file($config_dir.'/master.cf')){ - copy($config_dir.'/master.cf', $config_dir.'/master.cf~2'); - } - if(is_file($config_dir.'/master.cf~')){ - chmod($config_dir.'/master.cf~2', 0400); - } - //* Configure master.cf and add a line for deliver - $content = rf($conf["postfix"]["config_dir"].'/master.cf'); - $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}'."\n"; - af($config_dir.'/master.cf', $deliver_content); - unset($content); - unset($deliver_content); - } - - //* Reconfigure postfix to use dovecot authentication - // Adding the amavisd commands to the postfix configuration - $postconf_commands = array ( - 'dovecot_destination_recipient_limit = 1', - 'virtual_transport = '.$virtual_transport, - 'smtpd_sasl_type = dovecot', - 'smtpd_sasl_path = private/auth' - ); - - // Make a backup copy of the main.cf file - copy($conf["postfix"]["config_dir"].'/main.cf', $conf["postfix"]["config_dir"].'/main.cf~3'); - - // Executing the postconf commands - foreach($postconf_commands as $cmd) { - $command = "postconf -e '$cmd'"; - caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - } - - //* copy dovecot.conf - $config_dir = $conf['dovecot']['config_dir']; - $configfile = 'dovecot.conf'; - if(is_file($config_dir.'/'.$configfile)){ - copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~'); - } - - //* Get the dovecot version - exec('dovecot --version', $tmp); - $dovecot_version = $tmp[0]; - unset($tmp); - - //* Copy dovecot configuration file - if(version_compare($dovecot_version,2) >= 0) { - if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master')) { - copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile); - } else { - copy('tpl/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile); - } - replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0); - if(version_compare($dovecot_version,2.1) < 0) { - removeLine($config_dir.'/'.$configfile, 'ssl_protocols ='); - } - } else { - if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master')) { - copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master', $config_dir.'/'.$configfile); - } else { - copy('tpl/debian6_dovecot.conf.master', $config_dir.'/'.$configfile); - } - } - - //* dovecot-lmtpd - if($configure_lmtp) { - replaceLine($config_dir.'/'.$configfile, 'protocols = imap pop3', 'protocols = imap pop3 lmtp', 1, 0); - } - - //* dovecot-sql.conf - $configfile = 'dovecot-sql.conf'; - if(is_file($config_dir.'/'.$configfile)){ - copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~'); - chmod($config_dir.'/'.$configfile.'~', 0400); - } - $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot-sql.conf.master', 'tpl/debian6_dovecot-sql.conf.master'); - $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content); - $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); - $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); - $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); - $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); - $content = str_replace('{server_id}', $conf['server_id'], $content); - wf($config_dir.'/'.$configfile, $content); - - chmod($config_dir.'/'.$configfile, 0600); - chown($config_dir.'/'.$configfile, 'root'); - chgrp($config_dir.'/'.$configfile, 'root'); - - // Dovecot shall ignore mounts in website directory - if(is_installed('doveadm')) exec("doveadm mount add '/var/www/*' ignore > /dev/null 2> /dev/null"); - - } - - public function configure_apache() { - global $conf; - - if(file_exists('/etc/apache2/mods-available/fcgid.conf')) replaceLine('/etc/apache2/mods-available/fcgid.conf', 'MaxRequestLen', 'MaxRequestLen 15728640', 0, 1); - - parent::configure_apache(); - } - - public function configure_fail2ban() { - /* - copy('tpl/dovecot-pop3imap.conf.master',"/etc/fail2ban/filter.d/dovecot-pop3imap.conf"); - copy('tpl/dovecot_fail2ban_jail.local.master','/etc/fail2ban/jail.local'); - */ - } - -} - -?> -- GitLab From f20a721ff8237c1bda2530ea8bbb11a2eb419b78 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Fri, 16 Jun 2017 10:23:39 +0200 Subject: [PATCH 213/302] - fixed diff code --- install/dist/conf/debian90.conf.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/install/dist/conf/debian90.conf.php b/install/dist/conf/debian90.conf.php index 06d032def8..e5caab8aee 100644 --- a/install/dist/conf/debian90.conf.php +++ b/install/dist/conf/debian90.conf.php @@ -61,11 +61,7 @@ $conf['mysql']['port'] = '3306'; $conf['mysql']['database'] = 'dbispconfig'; $conf['mysql']['admin_user'] = 'root'; $conf['mysql']['admin_password'] = ''; -<<<<<<< HEAD -$conf['mysql']['charset'] = 'utf8mb4'; -======= $conf['mysql']['charset'] = 'utf8'; ->>>>>>> stable-3.1 $conf['mysql']['ispconfig_user'] = 'ispconfig'; $conf['mysql']['ispconfig_password'] = md5(uniqid(rand())); $conf['mysql']['master_slave_setup'] = 'n'; @@ -122,13 +118,10 @@ $conf['mailman']['installed'] = false; // will be detected automatically during $conf['mailman']['config_dir'] = '/etc/mailman'; $conf['mailman']['init_script'] = 'mailman'; -<<<<<<< HEAD //* mlmmj $conf['mlmmj']['installed'] = false; // will be detected automatically during installation $conf['mlmmj']['config_dir'] = '/etc/mlmmj'; -======= ->>>>>>> stable-3.1 //* Getmail $conf['getmail']['installed'] = false; // will be detected automatically during installation $conf['getmail']['config_dir'] = '/etc/getmail'; @@ -175,11 +168,7 @@ $conf['mydns']['init_script'] = 'mydns'; //* PowerDNS $conf['powerdns']['installed'] = false; // will be detected automatically during installation $conf['powerdns']['database'] = 'powerdns'; -<<<<<<< HEAD $conf['powerdns']['config_dir'] = '/etc/powerdns/pdns.d'; -======= -$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d'; ->>>>>>> stable-3.1 $conf['powerdns']['init_script'] = 'pdns'; //* BIND DNS Server @@ -214,19 +203,11 @@ $conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled'; $conf['nginx']['init_script'] = 'nginx'; $conf['nginx']['vhost_port'] = '8080'; $conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket'; -<<<<<<< HEAD -$conf['nginx']['php_fpm_init_script'] = 'php5-fpm'; -$conf['nginx']['php_fpm_ini_path'] = '/etc/php5/fpm/php.ini'; -$conf['nginx']['php_fpm_pool_dir'] = '/etc/php5/fpm/pool.d'; -$conf['nginx']['php_fpm_start_port'] = 9010; -$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php5-fpm'; -======= $conf['nginx']['php_fpm_init_script'] = 'php7.0-fpm'; $conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.0/fpm/php.ini'; $conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.0/fpm/pool.d'; $conf['nginx']['php_fpm_start_port'] = 9010; $conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.0-fpm'; ->>>>>>> stable-3.1 //* OpenVZ $conf['openvz']['installed'] = false; @@ -246,9 +227,5 @@ $conf['cron']['wget'] = '/usr/bin/wget'; //* Metronome XMPP $conf['xmpp']['installed'] = false; $conf['xmpp']['init_script'] = 'metronome'; -<<<<<<< HEAD -======= - ->>>>>>> stable-3.1 ?> -- GitLab From f0cae38a91e5cf469b8f4eb7766cee92a523f50a Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Tue, 20 Jun 2017 13:51:44 +0200 Subject: [PATCH 214/302] API SOAP security fix support attempts login verification support ascii output log login for external IPS (like fail2ban) --- interface/lib/classes/remoting.inc.php | 140 ++++++++++++++++--------- 1 file changed, 89 insertions(+), 51 deletions(-) diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index 69ebac2e4c..24577b3b26 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -71,6 +71,8 @@ class remoting { { global $app, $conf; + $error = array(); + // Maintenance mode $app->uses('ini_parser,getconf'); $server_config_array = $app->getconf->get_global_config('misc'); @@ -80,70 +82,60 @@ class remoting { } if(empty($username)) { - throw new SoapFault('login_username_empty', 'The login username is empty.'); - return false; + $error = array('faultcode' => 'login_username_empty', 'faultstring' => 'The login username is empty.'); } if(empty($password)) { - throw new SoapFault('login_password_empty', 'The login password is empty.'); - return false; + $error = array('faultcode' => 'login_password_empty', 'faultstring' => 'The login password is empty.'); } //* Delete old remoting sessions $sql = "DELETE FROM remote_session WHERE tstamp < UNIX_TIMESTAMP()"; $app->db->query($sql); - if($client_login == true) { - $sql = "SELECT * FROM sys_user WHERE USERNAME = ?"; - $user = $app->db->queryOneRecord($sql, $username); - if($user) { - $saved_password = stripslashes($user['passwort']); + $ip = md5($_SERVER['REMOTE_ADDR']); + $sql = "SELECT * FROM `attempts_login` WHERE `ip`= ? AND `login_time` > (NOW() - INTERVAL 1 MINUTE) LIMIT 1"; + $alreadyfailed = $app->db->queryOneRecord($sql, $ip); - if(substr($saved_password, 0, 3) == '$1$') { - //* The password is crypt-md5 encrypted - $salt = '$1$'.substr($saved_password, 3, 8).'$'; + if($alreadyfailed['times'] > 5) { + throw new SoapFault('error_user_too_many_logins', 'Too many failed logins'); + return false; + } - if(crypt(stripslashes($password), $salt) != $saved_password) { - throw new SoapFault('client_login_failed', 'The login failed. Username or password wrong.'); - return false; + if (empty($error)) { + + if($client_login == true) { + $sql = "SELECT * FROM sys_user WHERE USERNAME = ?"; + $user = $app->db->queryOneRecord($sql, $username); + if($user) { + $saved_password = stripslashes($user['passwort']); + + if(substr($saved_password, 0, 3) == '$1$') { + //* The password is crypt-md5 encrypted + $salt = '$1$'.substr($saved_password, 3, 8).'$'; + + if(crypt(stripslashes($password), $salt) != $saved_password) { + $error = array('faultcode' => 'client_login_failed', 'faultstring' => 'The login failed. Username or password wrong.'); + } + } else { + //* The password is md5 encrypted + if(md5($password) != $saved_password) { + $error = array('faultcode' => 'client_login_failed', 'faultstring' => 'The login failed. Username or password wrong.'); + } } } else { - //* The password is md5 encrypted - if(md5($password) != $saved_password) { - throw new SoapFault('client_login_failed', 'The login failed. Username or password wrong.'); - return false; - } + $error = array('faultcode' => 'client_login_failed', 'faultstring' => 'The login failed. Username or password wrong.'); + } + if($user['active'] != 1) { + $error = array('faultcode' => 'client_login_failed', 'faultstring' => 'The login failed. User is blocked.'); } - } else { - throw new SoapFault('client_login_failed', 'The login failed. Username or password wrong.'); - return false; - } - if($user['active'] != 1) { - throw new SoapFault('client_login_failed', 'The login failed. User is blocked.'); - return false; - } - // now we need the client data - $client = $app->db->queryOneRecord("SELECT client.can_use_api FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $user['default_group']); - if(!$client || $client['can_use_api'] != 'y') { - throw new SoapFault('client_login_failed', 'The login failed. Client may not use api.'); - return false; - } + // now we need the client data + $client = $app->db->queryOneRecord("SELECT client.can_use_api FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $user['default_group']); + if(!$client || $client['can_use_api'] != 'y') { + $error = array('faultcode' => 'client_login_failed', 'faultstring' => 'The login failed. Client may not use api.'); + } - //* Create a remote user session - //srand ((double)microtime()*1000000); - $remote_session = md5(mt_rand().uniqid('ispco')); - $remote_userid = $user['userid']; - $remote_functions = ''; - $tstamp = time() + $this->session_timeout; - $sql = 'INSERT INTO remote_session (remote_session,remote_userid,remote_functions,client_login,tstamp' - .') VALUES (?, ?, ?, 1, $tstamp)'; - $app->db->query($sql, $remote_session,$remote_userid,$remote_functions,$tstamp); - return $remote_session; - } else { - $sql = "SELECT * FROM remote_user WHERE remote_username = ? and remote_password = md5(?)"; - $remote_user = $app->db->queryOneRecord($sql, $username, $password); - if($remote_user['remote_userid'] > 0) { //* Create a remote user session //srand ((double)microtime()*1000000); $remote_session = md5(mt_rand().uniqid('ispco')); @@ -153,11 +145,57 @@ class remoting { $sql = 'INSERT INTO remote_session (remote_session,remote_userid,remote_functions,tstamp' .') VALUES (?, ?, ?, ?)'; $app->db->query($sql, $remote_session,$remote_userid,$remote_functions,$tstamp); - return $remote_session; } else { - throw new SoapFault('login_failed', 'The login failed. Username or password wrong.'); + $sql = "SELECT * FROM remote_user WHERE remote_username = ? and remote_password = md5(?)"; + $remote_user = $app->db->queryOneRecord($sql, $username, $password); + if($remote_user['remote_userid'] > 0) { + //* Create a remote user session + //srand ((double)microtime()*1000000); + $remote_session = md5(mt_rand().uniqid('ispco')); + $remote_userid = $remote_user['remote_userid']; + $remote_functions = $remote_user['remote_functions']; + $tstamp = time() + $this->session_timeout; + $sql = 'INSERT INTO remote_session (remote_session,remote_userid,remote_functions,tstamp' + .') VALUES (?, ?, ?, ?)'; + $app->db->query($sql, $remote_session,$remote_userid,$remote_functions,$tstamp); + } else { + $error = array('faultcode' => 'login_failed', 'faultstring' => 'The login failed. Username or password wrong.'); + } + } + + } + + if (! empty($error)) { + if(! $alreadyfailed['times']) { + //* user login the first time wrong + $sql = "INSERT INTO `attempts_login` (`ip`, `times`, `login_time`) VALUES (?, 1, NOW())"; + $app->db->query($sql, $ip); + } elseif($alreadyfailed['times'] >= 1) { + //* update times wrong + $sql = "UPDATE `attempts_login` SET `times`=`times`+1, `login_time`=NOW() WHERE `ip` = ? AND `login_time` < NOW() ORDER BY `login_time` DESC LIMIT 1"; + $app->db->query($sql, $ip); + } + + $authlog = 'Failed login for user \''. $username .'\' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s') . ' (api)'; + $authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a'); + fwrite($authlog_handle, $authlog ."\n"); + fclose($authlog_handle); + + throw new SoapFault($error['faultcode'], $error['faultstring']); return false; + } else { + // User login right, so attempts can be deleted + $sql = "DELETE FROM `attempts_login` WHERE `ip`=?"; + $app->db->query($sql, $ip); + + $authlog = 'Successful login for user \''. $username .'\' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s') . ' (api)'; + $authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a'); + fwrite($authlog_handle, $authlog ."\n"); + fclose($authlog_handle); } + + if (isset($remote_session)) { + return $remote_session; } } @@ -552,4 +590,4 @@ class remoting { } -?> +?> \ No newline at end of file -- GitLab From 4a425deb6f17686d80f14dbf293f7a6870aaa13f Mon Sep 17 00:00:00 2001 From: Paco Date: Tue, 4 Jul 2017 16:18:00 +0200 Subject: [PATCH 215/302] Update bg.lng --- interface/lib/lang/bg.lng | 74 +++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index ec811f3c29..9719e6680d 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -29,14 +29,14 @@ $wb['toolsarea_head_txt'] = 'Настройки'; $wb['page_and_txt'] = 'и'; $wb['top_menu_system'] = 'Система'; $wb['top_menu_client'] = 'Клиент'; -$wb['top_menu_email'] = 'Email'; +$wb['top_menu_email'] = 'Имейл'; $wb['top_menu_monitor'] = 'Монитор'; $wb['top_menu_sites'] = 'Сайтове'; $wb['top_menu_dns'] = 'DNS'; $wb['top_menu_tools'] = 'Инструменти'; $wb['top_menu_help'] = 'Помощ'; $wb['top_menu_billing'] = 'Фактуриране'; -$wb['top_menu_domain'] = 'Domains'; +$wb['top_menu_domain'] = 'Домейни'; $wb['top_menu_dashboard'] = 'Начало'; $wb['latest_news_txt'] = 'Последни новини'; $wb['top_menu_vm'] = 'VСървър'; @@ -69,34 +69,34 @@ $wb['monthnamesshort_oct'] = 'Окт'; $wb['monthnamesshort_nov'] = 'Ное'; $wb['monthnamesshort_dec'] = 'Дек'; $wb['logout_txt'] = 'Изход'; -$wb['conf_format_dateshort_human_readable'] = 'yyyy-mm-dd'; +$wb['conf_format_dateshort_human_readable'] = 'гггг-мм-дд'; $wb['submit_confirmation'] = 'Наистина ли си съгласен с това действие?'; -$wb['top_menu_mailuser'] = 'Mailuser'; -$wb['globalsearch_resultslimit_of_txt'] = 'of'; -$wb['globalsearch_resultslimit_results_txt'] = 'results'; -$wb['globalsearch_noresults_text_txt'] = 'No results.'; -$wb['globalsearch_noresults_limit_txt'] = '0 results'; -$wb['globalsearch_searchfield_watermark_txt'] = 'Search'; +$wb['top_menu_mailuser'] = 'Имейл потребител'; +$wb['globalsearch_resultslimit_of_txt'] = 'от'; +$wb['globalsearch_resultslimit_results_txt'] = 'резултата'; +$wb['globalsearch_noresults_text_txt'] = 'Няма намерени резултати.'; +$wb['globalsearch_noresults_limit_txt'] = '0 резултата'; +$wb['globalsearch_searchfield_watermark_txt'] = 'Търсене'; $wb['globalsearch_suggestions_text_txt'] = 'Suggestions'; $wb['global_tabchange_warning_txt'] = 'Changed data in this tab will be changed if you press OK. On cancel they will be discarded.'; $wb['global_tabchange_discard_txt'] = 'You have unsaved changes in this tab. Changes will be discarded if you continue.'; $wb['datalog_changes_txt'] = 'The following changes are not yet populated to all servers:'; $wb['datalog_changes_end_txt'] = 'Storing updates can take up to one minute. Please be patient.'; -$wb['datalog_status_i_web_database'] = 'Create new database'; -$wb['datalog_status_u_web_database'] = 'Update database'; -$wb['datalog_status_d_web_database'] = 'Delete database'; -$wb['datalog_status_i_web_database_user'] = 'Create database user for database'; -$wb['datalog_status_u_web_database_user'] = 'Update database user'; -$wb['datalog_status_d_web_database_user'] = 'Delete database user'; -$wb['datalog_status_i_web_domain'] = 'Create new website'; -$wb['datalog_status_u_web_domain'] = 'Update website settings'; -$wb['datalog_status_d_web_domain'] = 'Delete website'; -$wb['datalog_status_i_ftp_user'] = 'Create FTP user'; -$wb['datalog_status_u_ftp_user'] = 'Update FTP user'; -$wb['datalog_status_d_ftp_user'] = 'Delete FTP user'; -$wb['datalog_status_i_mail_domain'] = 'Create email domain'; -$wb['datalog_status_u_mail_domain'] = 'Update email domain'; -$wb['datalog_status_d_mail_domain'] = 'Delete email domain'; +$wb['datalog_status_i_web_database'] = 'Създай нова база данни'; +$wb['datalog_status_u_web_database'] = 'Обнови база данни'; +$wb['datalog_status_d_web_database'] = 'Изтрий база данни'; +$wb['datalog_status_i_web_database_user'] = 'Създай потребител за база данни'; +$wb['datalog_status_u_web_database_user'] = 'Обнови потребител за база данни'; +$wb['datalog_status_d_web_database_user'] = 'Изтрий потребител за база данни'; +$wb['datalog_status_i_web_domain'] = 'Създай нов уебсайт'; +$wb['datalog_status_u_web_domain'] = 'Обнови уебсайт настройките'; +$wb['datalog_status_d_web_domain'] = 'Изтрий уебсайт'; +$wb['datalog_status_i_ftp_user'] = 'Създай FTP потребител'; +$wb['datalog_status_u_ftp_user'] = 'Обнови FTP потребител'; +$wb['datalog_status_d_ftp_user'] = 'Изтрий FTP потребител'; +$wb['datalog_status_i_mail_domain'] = 'Създай имейл домейн'; +$wb['datalog_status_u_mail_domain'] = 'Обнови имейл домейн'; +$wb['datalog_status_d_mail_domain'] = 'Изтрий имейл домейн'; $wb['datalog_status_i_mail_user'] = 'Create email user'; $wb['datalog_status_u_mail_user'] = 'Update email user'; $wb['datalog_status_d_mail_user'] = 'Delete email user'; @@ -130,26 +130,26 @@ $wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user'; $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings'; $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings'; $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings'; -$wb['login_as_txt'] = 'Log in as'; +$wb['login_as_txt'] = 'Логнат като'; $wb['no_domain_perm'] = 'You have no permission for this domain.'; $wb['no_destination_perm'] = 'You have no permission for this destination.'; $wb['client_you_are_locked'] = 'You have no permission to change any settings.'; -$wb['gender_m_txt'] = 'Mr.'; -$wb['gender_f_txt'] = 'Ms.'; +$wb['gender_m_txt'] = 'Г-н.'; +$wb['gender_f_txt'] = 'Г-жа'; $wb['client_cannot_be_deleted_because_of_billing_module_txt'] = 'This client has records in the billing module, therefore he cannot be deleted.'; -$wb['yes_txt'] = 'Yes'; -$wb['no_txt'] = 'No'; -$wb['None'] = 'None'; -$wb['strength_1'] = 'Weak'; -$wb['strength_2'] = 'Fair'; -$wb['strength_3'] = 'Good'; -$wb['strength_4'] = 'Strong'; -$wb['strength_5'] = 'Very Strong'; +$wb['yes_txt'] = 'Да'; +$wb['no_txt'] = 'Не'; +$wb['None'] = 'Без'; +$wb['strength_1'] = 'Слаба'; +$wb['strength_2'] = 'Лесна'; +$wb['strength_3'] = 'Добра'; +$wb['strength_4'] = 'Сложна'; +$wb['strength_5'] = 'Много сложна'; $wb['weak_password_txt'] = 'The chosen password does not match the security guidelines. It has to be at least {chars} chars in length and have a strength of \\"{strength}\\".'; $wb['weak_password_length_txt'] = 'The chosen password does not match the security guidelines. It has to be at least {chars} chars in length.'; $wb['security_check1_txt'] = 'Check for security permission:'; $wb['security_check2_txt'] = 'failed.'; -$wb['err_csrf_attempt_blocked'] = 'CSRF attempt blocked.'; +$wb['err_csrf_attempt_blocked'] = 'CSRF опитът е блокиран.'; $wb['select_directive_snippet_txt'] = 'Directive Snippets'; $wb['select_master_directive_snippet_txt'] = 'Master Directive Snippets'; $wb['datalog_status_i_xmpp_domain'] = 'Create XMPP domain'; @@ -158,5 +158,5 @@ $wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; $wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; $wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; $wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; -$wb['datalog_changes_close_txt'] = 'Close'; +$wb['datalog_changes_close_txt'] = 'Затвори'; ?> -- GitLab From aed2993ef0b983f8cc7e15a26127a1c4f2be6c3b Mon Sep 17 00:00:00 2001 From: Paco Date: Wed, 5 Jul 2017 09:43:19 +0200 Subject: [PATCH 216/302] Full translate. --- interface/lib/lang/bg.lng | 110 +++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index 9719e6680d..9e7c24c93f 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -77,11 +77,11 @@ $wb['globalsearch_resultslimit_results_txt'] = 'резултата'; $wb['globalsearch_noresults_text_txt'] = 'Няма намерени резултати.'; $wb['globalsearch_noresults_limit_txt'] = '0 резултата'; $wb['globalsearch_searchfield_watermark_txt'] = 'Търсене'; -$wb['globalsearch_suggestions_text_txt'] = 'Suggestions'; -$wb['global_tabchange_warning_txt'] = 'Changed data in this tab will be changed if you press OK. On cancel they will be discarded.'; -$wb['global_tabchange_discard_txt'] = 'You have unsaved changes in this tab. Changes will be discarded if you continue.'; -$wb['datalog_changes_txt'] = 'The following changes are not yet populated to all servers:'; -$wb['datalog_changes_end_txt'] = 'Storing updates can take up to one minute. Please be patient.'; +$wb['globalsearch_suggestions_text_txt'] = 'Предложения'; +$wb['global_tabchange_warning_txt'] = 'Промените в тази секция бъдат запазени ако натиснете OK. При отмяна ще бъдат отхвърлени.'; +$wb['global_tabchange_discard_txt'] = 'Направили сте промени, които не са запазени. Промените ще бъдат отхвърлени, ако продължите.'; +$wb['datalog_changes_txt'] = 'Следните промени все още не са отразени на всички сървъри:'; +$wb['datalog_changes_end_txt'] = 'Запазването на промените може да отнеме до една минута. Моля, бъдете търпеливи.'; $wb['datalog_status_i_web_database'] = 'Създай нова база данни'; $wb['datalog_status_u_web_database'] = 'Обнови база данни'; $wb['datalog_status_d_web_database'] = 'Изтрий база данни'; @@ -97,46 +97,46 @@ $wb['datalog_status_d_ftp_user'] = 'Изтрий FTP потребител'; $wb['datalog_status_i_mail_domain'] = 'Създай имейл домейн'; $wb['datalog_status_u_mail_domain'] = 'Обнови имейл домейн'; $wb['datalog_status_d_mail_domain'] = 'Изтрий имейл домейн'; -$wb['datalog_status_i_mail_user'] = 'Create email user'; -$wb['datalog_status_u_mail_user'] = 'Update email user'; -$wb['datalog_status_d_mail_user'] = 'Delete email user'; -$wb['datalog_status_i_mail_forwarding'] = 'Create email address'; -$wb['datalog_status_u_mail_forwarding'] = 'Update email address'; -$wb['datalog_status_d_mail_forwarding'] = 'Delete email address'; -$wb['datalog_status_i_dns_rr'] = 'Create DNS record'; -$wb['datalog_status_u_dns_rr'] = 'Update DNS record'; -$wb['datalog_status_d_dns_rr'] = 'Delete DNS record'; -$wb['datalog_status_i_dns_soa'] = 'Create DNS zone'; -$wb['datalog_status_u_dns_soa'] = 'Update DNS zone'; -$wb['datalog_status_d_dns_soa'] = 'Delete DNS zone'; -$wb['datalog_status_i_cron'] = 'Create cron job'; -$wb['datalog_status_u_cron'] = 'Update cron job'; -$wb['datalog_status_d_cron'] = 'Delete cron job'; -$wb['datalog_status_i_mail_get'] = 'Create mail fetcher account'; -$wb['datalog_status_u_mail_get'] = 'Update mail fetcher account'; -$wb['datalog_status_d_mail_get'] = 'Delete mail fetcher account'; -$wb['datalog_status_i_mail_mailinglist'] = 'Create mailing list'; -$wb['datalog_status_u_mail_mailinglist'] = 'Update mailing list'; -$wb['datalog_status_d_mail_mailinglist'] = 'Delete mailing list'; -$wb['datalog_status_i_shell_user'] = 'Create shell user'; -$wb['datalog_status_u_shell_user'] = 'Update shell user'; -$wb['datalog_status_d_shell_user'] = 'Delete shell user'; -$wb['datalog_status_i_web_folder'] = 'Create folder protection'; -$wb['datalog_status_u_web_folder'] = 'Update folder protection'; -$wb['datalog_status_d_web_folder'] = 'Delete folder protection'; -$wb['datalog_status_i_web_folder_user'] = 'Create folder protection user'; -$wb['datalog_status_u_web_folder_user'] = 'Update folder protection user'; -$wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user'; -$wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings'; -$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings'; -$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings'; +$wb['datalog_status_i_mail_user'] = 'Създай имейл потребител'; +$wb['datalog_status_u_mail_user'] = 'Обнови имейл потребител'; +$wb['datalog_status_d_mail_user'] = 'Изтрий имейл потребител'; +$wb['datalog_status_i_mail_forwarding'] = 'Създай имейл адрес'; +$wb['datalog_status_u_mail_forwarding'] = 'Обнови имейл адрес'; +$wb['datalog_status_d_mail_forwarding'] = 'Изтрий имейл адрес'; +$wb['datalog_status_i_dns_rr'] = 'Създай DNS запис'; +$wb['datalog_status_u_dns_rr'] = 'Обнови DNS запис'; +$wb['datalog_status_d_dns_rr'] = 'Изтрий DNS запис'; +$wb['datalog_status_i_dns_soa'] = 'Създай DNS зона'; +$wb['datalog_status_u_dns_soa'] = 'Обнови DNS зона'; +$wb['datalog_status_d_dns_soa'] = 'Изтрий DNS зона'; +$wb['datalog_status_i_cron'] = 'Създай автоматична задача'; +$wb['datalog_status_u_cron'] = 'Обнови автоматична задача'; +$wb['datalog_status_d_cron'] = 'Изтрий автоматична задача'; +$wb['datalog_status_i_mail_get'] = 'Създай имейл акаунт за извличане на поща'; +$wb['datalog_status_u_mail_get'] = 'Обнови имейл акаунт за извличане на поща'; +$wb['datalog_status_d_mail_get'] = 'Изтрий имейл акаунт за извличане на поща'; +$wb['datalog_status_i_mail_mailinglist'] = 'Създай пощенски списък'; +$wb['datalog_status_u_mail_mailinglist'] = 'Обнови пощенски списък'; +$wb['datalog_status_d_mail_mailinglist'] = 'Изтрий пощенски списък'; +$wb['datalog_status_i_shell_user'] = 'Създай shell потребител'; +$wb['datalog_status_u_shell_user'] = 'Обнови shell потребител'; +$wb['datalog_status_d_shell_user'] = 'Изтрий shell потребител'; +$wb['datalog_status_i_web_folder'] = 'Създай защитена директория'; +$wb['datalog_status_u_web_folder'] = 'Обнови защитена директория'; +$wb['datalog_status_d_web_folder'] = 'Изтрий защитена директория'; +$wb['datalog_status_i_web_folder_user'] = 'Създай потребител за защитена директория'; +$wb['datalog_status_u_web_folder_user'] = 'Обнови потребител за защитена директория'; +$wb['datalog_status_d_web_folder_user'] = 'Изтрий потребител за защитена директория'; +$wb['datalog_status_i_spamfilter_users'] = 'Създай спам филтър настройки'; +$wb['datalog_status_u_spamfilter_users'] = 'Обнови спам филтър настройки'; +$wb['datalog_status_d_spamfilter_users'] = 'Изтрий спам филтър настройки'; $wb['login_as_txt'] = 'Логнат като'; -$wb['no_domain_perm'] = 'You have no permission for this domain.'; -$wb['no_destination_perm'] = 'You have no permission for this destination.'; -$wb['client_you_are_locked'] = 'You have no permission to change any settings.'; -$wb['gender_m_txt'] = 'Г-н.'; +$wb['no_domain_perm'] = 'Нямате права върху този домейн.'; +$wb['no_destination_perm'] = 'Нямате права върху тази дестинация.'; +$wb['client_you_are_locked'] = 'Нямате права да променяте каквито и да било настройки.'; +$wb['gender_m_txt'] = 'Г-н'; $wb['gender_f_txt'] = 'Г-жа'; -$wb['client_cannot_be_deleted_because_of_billing_module_txt'] = 'This client has records in the billing module, therefore he cannot be deleted.'; +$wb['client_cannot_be_deleted_because_of_billing_module_txt'] = 'Този клиент не може да бъде изтрит, тъй като за него съществуват записи в билинг системата.'; $wb['yes_txt'] = 'Да'; $wb['no_txt'] = 'Не'; $wb['None'] = 'Без'; @@ -145,18 +145,18 @@ $wb['strength_2'] = 'Лесна'; $wb['strength_3'] = 'Добра'; $wb['strength_4'] = 'Сложна'; $wb['strength_5'] = 'Много сложна'; -$wb['weak_password_txt'] = 'The chosen password does not match the security guidelines. It has to be at least {chars} chars in length and have a strength of \\"{strength}\\".'; -$wb['weak_password_length_txt'] = 'The chosen password does not match the security guidelines. It has to be at least {chars} chars in length.'; -$wb['security_check1_txt'] = 'Check for security permission:'; -$wb['security_check2_txt'] = 'failed.'; +$wb['weak_password_txt'] = 'Избраната парола не отговаря на изискванията за сигурност. Трябва да съдържа поне {chars} символа и сложността и трябва да е \\"{strength}\\".'; +$wb['weak_password_length_txt'] = 'Избраната парола не отговаря на изискванията за сигурност. Трябва да съдържа поне {chars} символа.'; +$wb['security_check1_txt'] = 'Проверете за права за сигурност:'; +$wb['security_check2_txt'] = 'се провали.'; $wb['err_csrf_attempt_blocked'] = 'CSRF опитът е блокиран.'; -$wb['select_directive_snippet_txt'] = 'Directive Snippets'; -$wb['select_master_directive_snippet_txt'] = 'Master Directive Snippets'; -$wb['datalog_status_i_xmpp_domain'] = 'Create XMPP domain'; -$wb['datalog_status_u_xmpp_domain'] = 'Update XMPP domain'; -$wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; -$wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; -$wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; -$wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['select_directive_snippet_txt'] = 'Извлечения от директивите'; +$wb['select_master_directive_snippet_txt'] = 'Мастър Извлечения от директивите'; +$wb['datalog_status_i_xmpp_domain'] = 'Създай XMPP домейн'; +$wb['datalog_status_u_xmpp_domain'] = 'Обнови XMPP домейн'; +$wb['datalog_status_d_xmpp_domain'] = 'Изтрий XMPP домейн'; +$wb['datalog_status_i_xmpp_user'] = 'Създай XMPP потребител'; +$wb['datalog_status_u_xmpp_user'] = 'Обнови XMPP потребител'; +$wb['datalog_status_d_xmpp_user'] = 'Изтрий XMPP потребител'; $wb['datalog_changes_close_txt'] = 'Затвори'; ?> -- GitLab From 2fd9e22ef4e49e977d5b87e41745fc9473bd143f Mon Sep 17 00:00:00 2001 From: Paco Date: Wed, 5 Jul 2017 09:45:09 +0200 Subject: [PATCH 217/302] Update bg.lng --- interface/web/vm/lib/lang/bg.lng | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/vm/lib/lang/bg.lng b/interface/web/vm/lib/lang/bg.lng index 4167e14a8a..b42a772d5b 100644 --- a/interface/web/vm/lib/lang/bg.lng +++ b/interface/web/vm/lib/lang/bg.lng @@ -1,7 +1,7 @@ -- GitLab From db8c37e816cd550fc9852f5100b5a13fe21b4f8d Mon Sep 17 00:00:00 2001 From: Paco Date: Wed, 5 Jul 2017 09:50:50 +0200 Subject: [PATCH 218/302] Full translated. --- interface/web/dns/lib/lang/bg.lng | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/web/dns/lib/lang/bg.lng b/interface/web/dns/lib/lang/bg.lng index 6208f82996..643b9d937c 100644 --- a/interface/web/dns/lib/lang/bg.lng +++ b/interface/web/dns/lib/lang/bg.lng @@ -4,10 +4,10 @@ $wb['Zones'] = 'Зони'; $wb['DNS A'] = 'DNS A'; $wb['DNS ALIAS'] = 'DNS ALIAS'; $wb['DNS CNAME'] = 'DNS CNAME'; -$wb['DNS hinfo'] = 'DNS hinfo'; -$wb['DNS mx'] = 'DNS mx'; -$wb['DNS ns'] = 'DNS ns'; -$wb['DNS ptr'] = 'DNS ptr'; +$wb['DNS hinfo'] = 'DNS HINFO'; +$wb['DNS mx'] = 'DNS MX'; +$wb['DNS ns'] = 'DNS NS'; +$wb['DNS ptr'] = 'DNS PTR'; $wb['DNS RP'] = 'DNS RP'; $wb['DNS Zone'] = 'DNS Зона'; $wb['Records'] = 'Записи'; @@ -16,7 +16,7 @@ $wb['DNS TXT Record'] = 'DNS TXT Запис'; $wb['DNS TXT'] = 'DNS TXT'; $wb['DNS Wizard'] = 'DNS Помощник'; $wb['Add DNS Zone'] = 'Добави DNS зона'; -$wb['Templates'] = 'Шаблон'; +$wb['Templates'] = 'Темплейт'; $wb['Secondary Zones'] = 'Вторична зона'; -$wb['Import Zone File'] = 'Въведи зона чрез файл'; +$wb['Import Zone File'] = 'Импортирай зонов файл'; ?> -- GitLab From 1e9ce6ff595762637441d32c52e8aee8b4655984 Mon Sep 17 00:00:00 2001 From: Paco Date: Wed, 5 Jul 2017 09:55:03 +0200 Subject: [PATCH 219/302] Full translated, fixed syntax errors. --- interface/web/help/lib/lang/bg.lng | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/web/help/lib/lang/bg.lng b/interface/web/help/lib/lang/bg.lng index fa57a5d4d9..7d65941b79 100644 --- a/interface/web/help/lib/lang/bg.lng +++ b/interface/web/help/lib/lang/bg.lng @@ -6,9 +6,9 @@ $wb['View messages'] = 'Преглед на съобщенията'; $wb['Support'] = 'Поддръжка'; $wb['About ISPConfig'] = 'За ISPConfig'; $wb['Version'] = 'Версия'; -$wb['Frequently Asked Questions'] = 'Често задавани въпроси'; -$wb['FAQ Sections'] = 'ЧЗВ секция'; -$wb['Manage Sections'] = 'Редактирай секциите'; -$wb['Add a Question & Answer Pair'] = 'Добави въпрос & Отговор '; -$wb['Manage Questions'] = 'Редактирай въпроса'; +$wb['Frequently Asked Questions'] = 'Често Задавани Въпроси'; +$wb['FAQ Sections'] = 'ЧЗВ секции'; +$wb['Manage Sections'] = 'Управление секциите'; +$wb['Add a Question & Answer Pair'] = 'Добави Въпрос и Отговор'; +$wb['Manage Questions'] = 'Управление на въпросите'; ?> -- GitLab From e6309698eb9f481e1fda311b84c497202224722e Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Fri, 7 Jul 2017 20:06:54 +0200 Subject: [PATCH 220/302] - completely re-worked Let's Encrypt handling, fixes #4691, #4589 and maybe others --- server/lib/classes/letsencrypt.inc.php | 351 ++++++++++++++++++ server/lib/classes/system.inc.php | 43 ++- .../plugins-available/apache2_plugin.inc.php | 293 ++------------- server/plugins-available/nginx_plugin.inc.php | 255 ++----------- 4 files changed, 467 insertions(+), 475 deletions(-) create mode 100644 server/lib/classes/letsencrypt.inc.php diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php new file mode 100644 index 0000000000..f32a67f679 --- /dev/null +++ b/server/lib/classes/letsencrypt.inc.php @@ -0,0 +1,351 @@ +renew_config_path)) return false; + + $dir = opendir($this->renew_config_path); + if(!$dir) return false; + + $path_scores = array(); + + $main_domain = reset($domains); + sort($domains); + $min_diff = false; + + while($file = readdir($dir)) { + if($file === '.' || $file === '..' || substr($file, -5) !== '.conf') continue; + $file_path = $this->renew_config_path . '/' . $file; + if(!is_file($file_path) || !is_readable($file_path)) continue; + + $fp = fopen($file_path, 'r'); + if(!$fp) continue; + + $path_scores[$file_path] = array( + 'domains' => array(), + 'diff' => 0, + 'has_main_domain' => false, + 'cert_paths' => array( + 'cert' => '', + 'privkey' => '', + 'chain' => '', + 'fullchain' => '' + ) + ); + $in_list = false; + while(!feof($fp) && $line = fgets($fp)) { + $line = trim($line); + if($line === '') continue; + elseif(!$in_list) { + if($line == '[[webroot_map]]') $in_list = true; + + $tmp = explode('=', $line, 2); + if(count($tmp) != 2) continue; + $key = trim($tmp[0]); + if($key == 'cert' || $key == 'privkey' || $key == 'chain' || $key == 'fullchain') { + $path_scores[$file_path]['cert_paths'][$key] = trim($tmp[1]); + } + + continue; + } + + $tmp = explode('=', $line, 2); + if(count($tmp) != 2) continue; + + $domain = trim($tmp[0]); + if($domain == $main_domain) $path_scores[$file_path]['has_main_domain'] = true; + $path_scores[$file_path]['domains'][] = $domain; + } + fclose($fp); + + sort($path_scores[$file_path]['domains']); + if(count(array_intersect($domains, $path_scores[$file_path]['domains'])) < 1) { + $path_scores[$file_path]['diff'] = false; + } else { + // give higher diff value to missing domains than to those that are too much in there + $path_scores[$file_path]['diff'] = (count(array_diff($domains, $path_scores[$file_path]['domains'])) * 1.5) + count(array_diff($path_scores[$file_path]['domains'], $domains)); + } + + if($min_diff === false || $path_scores[$file_path]['diff'] < $min_diff) $min_diff = $path_scores[$file_path]['diff']; + } + closedir($dir); + + if($min_diff === false) return false; + + $cert_paths = false; + $used_path = false; + foreach($path_scores as $path => $data) { + if($data['diff'] === $min_diff) { + $used_path = $path; + $cert_paths = $data['cert_paths']; + if($data['has_main_domain'] == true) break; + } + } + + $app->log("Let's Encrypt Cert config path is: " . ($used_path ? $used_path : "not found") . ".", LOGLEVEL_DEBUG); + + return $cert_paths; + } + + private function get_ssl_domain($data) { + $domain = $data['new']['ssl_domain']; + if(!$domain) $domain = $data['new']['domain']; + + if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') { + $domain = $data['new']['domain']; + if(substr($domain, 0, 2) === '*.') { + // wildcard domain not yet supported by letsencrypt! + $app->log('Wildcard domains not yet supported by letsencrypt, so changing ' . $domain . ' to ' . substr($domain, 2), LOGLEVEL_WARN); + $domain = substr($domain, 2); + } + } + + return $domain; + } + + public function get_website_certificate_paths($data) { + global $app; + + $ssl_dir = $data['new']['document_root'].'/ssl'; + $domain = $this->get_ssl_domain($data); + + $cert_paths = array( + 'domain' => $domain, + 'key' => $ssl_dir.'/'.$domain.'.key', + 'key2' => $ssl_dir.'/'.$domain.'.key.org', + 'csr' => $ssl_dir.'/'.$domain.'.csr', + 'crt' => $ssl_dir.'/'.$domain.'.crt', + 'bundle' => $ssl_dir.'/'.$domain.'.bundle' + ); + + if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') { + $cert_paths = array( + 'domain' => $domain, + 'key' => $ssl_dir.'/'.$domain.'-le.key', + 'key2' => $ssl_dir.'/'.$domain.'-le.key.org', + 'crt' => $ssl_dir.'/'.$domain.'-le.crt', + 'bundle' => $ssl_dir.'/'.$domain.'-le.bundle' + ); + } + + return $cert_paths; + } + + public function request_certificates($data, $server_type = 'apache') { + global $app, $conf; + + $app->uses('getconf'); + $web_config = $app->getconf->get_server_config($conf['server_id'], 'web'); + + $tmp = $app->letsencrypt->get_website_certificate_paths($data); + $domain = $tmp['domain']; + $key_file = $tmp['key']; + $key_file2 = $tmp['key2']; + $csr_file = $tmp['csr']; + $crt_file = $tmp['crt']; + $bundle_file = $tmp['bundle']; + + // default values + $temp_domains = array($domain); + $cli_domain_arg = ''; + $subdomains = null; + $aliasdomains = null; + + //* be sure to have good domain + if(substr($domain,0,4) != 'www.' && ($data['new']['subdomain'] == "www" || $data['new']['subdomain'] == "*")) { + $temp_domains[] = "www." . $domain; + } + + //* then, add subdomain if we have + $subdomains = $app->db->queryAllRecords('SELECT domain FROM web_domain WHERE parent_domain_id = '.intval($data['new']['domain_id'])." AND active = 'y' AND type = 'subdomain'"); + if(is_array($subdomains)) { + foreach($subdomains as $subdomain) { + $temp_domains[] = $subdomain['domain']; + } + } + + //* then, add alias domain if we have + $aliasdomains = $app->db->queryAllRecords('SELECT domain,subdomain FROM web_domain WHERE parent_domain_id = '.intval($data['new']['domain_id'])." AND active = 'y' AND type = 'alias'"); + if(is_array($aliasdomains)) { + foreach($aliasdomains as $aliasdomain) { + $temp_domains[] = $aliasdomain['domain']; + if(isset($aliasdomain['subdomain']) && substr($aliasdomain['domain'],0,4) != 'www.' && ($aliasdomain['subdomain'] == "www" OR $aliasdomain['subdomain'] == "*")) { + $temp_domains[] = "www." . $aliasdomain['domain']; + } + } + } + + // prevent duplicate + $temp_domains = array_unique($temp_domains); + + // check if domains are reachable to avoid letsencrypt verification errors + $le_rnd_file = uniqid('le-') . '.txt'; + $le_rnd_hash = md5(uniqid('le-', true)); + if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/')) { + $app->system->mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/', false, 0755, true); + } + file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); + + $le_domains = array(); + foreach($temp_domains as $temp_domain) { + if(isset($web_config['skip_le_check']) && $web_config['skip_le_check'] == 'y') { + $le_domains[] = $temp_domain; + } else { + $le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file)); + if($le_hash_check == $le_rnd_hash) { + $le_domains[] = $temp_domain; + $app->log("Verified domain " . $temp_domain . " should be reachable for letsencrypt.", LOGLEVEL_DEBUG); + } else { + $app->log("Could not verify domain " . $temp_domain . ", so excluding it from letsencrypt request.", LOGLEVEL_WARN); + } + } + } + $temp_domains = $le_domains; + unset($le_domains); + @unlink('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file); + + // generate cli format + foreach($temp_domains as $temp_domain) { + $cli_domain_arg .= (string) " --domains " . $temp_domain; + } + + $le_files = $this->get_letsencrypt_certificate_paths($temp_domains); + + // unset useless data + unset($subdomains); + unset($aliasdomains); + unset($temp_domains); + + if($server_type != 'apache' || version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) { + $crt_tmp_file = $le_files['fullchain']; + } else { + $crt_tmp_file = $le_files['cert']; + } + + $key_tmp_file = $le_files['privkey']; + $bundle_tmp_file = $le_files['chain']; + + $letsencrypt_cmd = ''; + $success = false; + if(!empty($cli_domain_arg)) { + $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); + $app->log("Let's Encrypt SSL Cert domains: $cli_domain_arg", LOGLEVEL_DEBUG); + + $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); + $letsencrypt = reset($letsencrypt); + if(is_executable($letsencrypt)) { + $letsencrypt_cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $cli_domain_arg --webroot-path /usr/local/ispconfig/interface/acme"; + $success = $app->system->_exec($letsencrypt_cmd); + } + } + + if(!$success) { + // error issuing cert + $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN); + $app->log($letsencrypt_cmd, LOGLEVEL_WARN); + + // if cert already exists, dont remove it. Ex. expired/misstyped/noDnsYet alias domain, api down... + if(!file_exists($crt_tmp_file)) { + return false; + } + } + + //* check is been correctly created + if(file_exists($crt_tmp_file)) { + $app->log("Let's Encrypt Cert file: $crt_tmp_file exists.", LOGLEVEL_DEBUG); + $date = date("YmdHis"); + + //* TODO: check if is a symlink, if target same keep it, either remove it + if(is_file($key_file)) { + $app->system->copy($key_file, $key_file.'.old.'.$date); + $app->system->chmod($key_file.'.old.'.$date, 0400); + $app->system->unlink($key_file); + } + + if ($web_config["website_symlinks_rel"] == 'y') { + $app->system->create_relative_link(escapeshellcmd($key_tmp_file), escapeshellcmd($key_file)); + } else { + if(@is_link($key_file)) $app->system->unlink($key_file); + if(@file_exists($key_tmp_file)) exec("ln -s ".escapeshellcmd($key_tmp_file)." ".escapeshellcmd($key_file)); + } + + if(is_file($crt_file)) { + $app->system->copy($crt_file, $crt_file.'.old.'.$date); + $app->system->chmod($crt_file.'.old.'.$date, 0400); + $app->system->unlink($crt_file); + } + + if($web_config["website_symlinks_rel"] == 'y') { + $app->system->create_relative_link(escapeshellcmd($crt_tmp_file), escapeshellcmd($crt_file)); + } else { + if(@is_link($crt_file)) $app->system->unlink($crt_file); + if(@file_exists($crt_tmp_file))exec("ln -s ".escapeshellcmd($crt_tmp_file)." ".escapeshellcmd($crt_file)); + } + + if(is_file($bundle_file)) { + $app->system->copy($bundle_file, $bundle_file.'.old.'.$date); + $app->system->chmod($bundle_file.'.old.'.$date, 0400); + $app->system->unlink($bundle_file); + } + + if($web_config["website_symlinks_rel"] == 'y') { + $app->system->create_relative_link(escapeshellcmd($bundle_tmp_file), escapeshellcmd($bundle_file)); + } else { + if(@is_link($bundle_file)) $app->system->unlink($bundle_file); + if(@file_exists($bundle_tmp_file)) exec("ln -s ".escapeshellcmd($bundle_tmp_file)." ".escapeshellcmd($bundle_file)); + } + + return true; + } else { + $app->log("Let's Encrypt Cert file: $crt_tmp_file does not exist.", LOGLEVEL_DEBUG); + return false; + } + } +} + +?> diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 2724c9a839..f4d94743a1 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -857,13 +857,13 @@ class system{ return rename($filename, $new_filename); } - function mkdir($dirname, $allow_symlink = false) { + function mkdir($dirname, $allow_symlink = false, $mode = 0777, $recursive = false) { global $app; if($allow_symlink == false && $this->checkpath($dirname) == false) { $app->log("Action aborted, file is a symlink: $dirname", LOGLEVEL_WARN); return false; } - if(@mkdir($dirname)) { + if(@mkdir($dirname, $mode, $recursive)) { return true; } else { $app->log("mkdir failed: $dirname", LOGLEVEL_DEBUG); @@ -894,6 +894,35 @@ class system{ } } + public function create_relative_link($f, $t) { + global $app; + + // $from already exists + $from = realpath($f); + + // realpath requires the traced file to exist - so, lets touch it first, then remove + @$app->system->unlink($t); touch($t); + $to = realpath($t); + @$app->system->unlink($t); + + // Remove from the left side matching path elements from $from and $to + // and get path elements counts + $a1 = explode('/', $from); $a2 = explode('/', $to); + for ($c = 0; $a1[$c] == $a2[$c]; $c++) { + unset($a1[$c]); unset($a2[$c]); + } + $cfrom = implode('/', $a1); + + // Check if a path is fully a subpath of another - no way to create symlink in the case + if (count($a1) == 0 || count($a2) == 0) return false; + + // Add ($cnt_to-1) number of "../" elements to left side of $cfrom + for ($c = 0; $c < (count($a2)-1); $c++) { $cfrom = '../'.$cfrom; } + if(strstr($to,'/etc/letsencrypt/archive/')) $to = str_replace('/etc/letsencrypt/archive/','/etc/letsencrypt/live/',$to); + + return symlink($cfrom, $to); + } + function checkpath($path) { $path = trim($path); //* We allow only absolute paths @@ -1656,6 +1685,16 @@ class system{ } } + + function _exec($command) { + global $app; + $out = array(); + $ret = 0; + $app->log('exec: '.$command, LOGLEVEL_DEBUG); + exec($command, $out, $ret); + if($ret != 0) return false; + else return true; + } //* Check if a application is installed function is_installed($appname) { diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 12c45543a6..548d11dd71 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -581,7 +581,7 @@ class apache2_plugin { $groupname = escapeshellcmd($data['new']['system_group']); if($data['new']['system_group'] != '' && !$app->system->is_group($data['new']['system_group'])) { exec('groupadd '.$fixed_gid_param.' '.$groupname); - if($apache_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' groupadd '.$groupname); + if($apache_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' groupadd '.$groupname); $app->log('Adding the group: '.$groupname, LOGLEVEL_DEBUG); } @@ -589,10 +589,10 @@ class apache2_plugin { if($data['new']['system_user'] != '' && !$app->system->is_user($data['new']['system_user'])) { if($web_config['add_web_users_to_sshusers_group'] == 'y') { exec('useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param -G sshusers $username -s /bin/false"); - if($apache_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param -G sshusers $username -s /bin/false"); + if($apache_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param -G sshusers $username -s /bin/false"); } else { exec('useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param $username -s /bin/false"); - if($apache_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param $username -s /bin/false"); + if($apache_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param $username -s /bin/false"); } $app->log('Adding the user: '.$username, LOGLEVEL_DEBUG); } @@ -666,7 +666,7 @@ class apache2_plugin { exec($command); } - if($apache_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); + if($apache_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); //* Change the log mount /* @@ -785,7 +785,7 @@ class apache2_plugin { if(!is_link($tmp_symlink)) { // exec("ln -s ".escapeshellcmd($data["new"]["document_root"])."/ ".escapeshellcmd($tmp_symlink)); if ($web_config["website_symlinks_rel"] == 'y') { - $this->create_relative_link(escapeshellcmd($data["new"]["document_root"]), escapeshellcmd($tmp_symlink)); + $app->system->create_relative_link(escapeshellcmd($data["new"]["document_root"]), escapeshellcmd($tmp_symlink)); } else { exec("ln -s ".escapeshellcmd($data["new"]["document_root"])."/ ".escapeshellcmd($tmp_symlink)); } @@ -906,12 +906,12 @@ class apache2_plugin { if($this->action == 'insert' || $data["new"]["system_user"] != $data["old"]["system_user"]) { // Chown and chmod the directories below the document root - $this->_exec('chown -R '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); + $app->system->_exec('chown -R '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); // The document root itself has to be owned by root in normal level and by the web owner in security level 20 if($web_config['security_level'] == 20) { - $this->_exec('chown '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); + $app->system->_exec('chown '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); } else { - $this->_exec('chown root:root '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); + $app->system->_exec('chown root:root '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); } } @@ -946,12 +946,12 @@ class apache2_plugin { $command = 'usermod'; $command .= ' --groups sshusers'; $command .= ' '.escapeshellcmd($data['new']['system_user']).' 2>/dev/null'; - $this->_exec($command); + $app->system->_exec($command); } //* if we have a chrooted Apache environment if($apache_chrooted) { - $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); + $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); //* add the apache user to the client group in the chroot environment $tmp_groupfile = $app->system->server_conf['group_datei']; @@ -1097,10 +1097,6 @@ class apache2_plugin { } } } - - foreach($sub_prefixes as $s) { - $temp_domains[] = $s . $aliasdomain['domain']; - } } } } @@ -1145,34 +1141,20 @@ class apache2_plugin { '{DOCROOT_CLIENT}' => $vhost_data['web_document_root'] ); $vhost_data['apache_directives'] = strtr($vhost_data['apache_directives'], $trans); - + + $app->uses('letsencrypt'); // Check if a SSL cert exists - $ssl_dir = $data['new']['document_root'].'/ssl'; - $domain = $data['new']['ssl_domain']; - if(!$domain) $domain = $data['new']['domain']; - $key_file = $ssl_dir.'/'.$domain.'.key'; - $key_file2 = $ssl_dir.'/'.$domain.'.key.org'; - $csr_file = $ssl_dir.'/'.$domain.'.csr'; - $crt_file = $ssl_dir.'/'.$domain.'.crt'; - $bundle_file = $ssl_dir.'/'.$domain.'.bundle'; - - if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') { - $domain = $data['new']['domain']; - if(substr($domain, 0, 2) === '*.') { - // wildcard domain not yet supported by letsencrypt! - $app->log('Wildcard domains not yet supported by letsencrypt, so changing ' . $domain . ' to ' . substr($domain, 2), LOGLEVEL_WARN); - $domain = substr($domain, 2); - } - - $data['new']['ssl_domain'] = $domain; - $vhost_data['ssl_domain'] = $domain; - - $key_file = $ssl_dir.'/'.$domain.'-le.key'; - $key_file2 = $ssl_dir.'/'.$domain.'-le.key.org'; - $crt_file = $ssl_dir.'/'.$domain.'-le.crt'; - $bundle_file = $ssl_dir.'/'.$domain.'-le.bundle'; - } - + $tmp = $app->letsencrypt->get_website_certificate_paths($data); + $domain = $tmp['domain']; + $key_file = $tmp['key']; + $key_file2 = $tmp['key2']; + $csr_file = $tmp['csr']; + $crt_file = $tmp['crt']; + $bundle_file = $tmp['bundle']; + unset($tmp); + + $data['new']['ssl_domain'] = $domain; + $vhost_data['ssl_domain'] = $domain; $vhost_data['ssl_crt_file'] = $crt_file; $vhost_data['ssl_key_file'] = $key_file; $vhost_data['ssl_bundle_file'] = $bundle_file; @@ -1184,179 +1166,28 @@ class apache2_plugin { || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain || $this->update_letsencrypt == true )) { - // default values - $temp_domains = array($domain); - $lddomain = ''; - $subdomains = null; - $aliasdomains = null; - $sub_prefixes = array(); - - //* be sure to have good domain - if(substr($domain,0,4) != 'www.' && ($data['new']['subdomain'] == "www" OR $data['new']['subdomain'] == "*")) { - $temp_domains[] = "www." . $domain; - } - - //* then, add subdomain if we have - $subdomains = $app->db->queryAllRecords('SELECT domain FROM web_domain WHERE parent_domain_id = '.intval($data['new']['domain_id'])." AND active = 'y' AND type = 'subdomain'"); - if(is_array($subdomains)) { - foreach($subdomains as $subdomain) { - $temp_domains[] = $subdomain['domain']; - $sub_prefixes[] = str_replace($domain, "", $subdomain['domain']); - } - } - //* then, add alias domain if we have - $aliasdomains = $app->db->queryAllRecords('SELECT domain,subdomain FROM web_domain WHERE parent_domain_id = '.intval($data['new']['domain_id'])." AND active = 'y' AND type = 'alias'"); - if(is_array($aliasdomains)) { - foreach($aliasdomains as $aliasdomain) { - $temp_domains[] = $aliasdomain['domain']; - if(isset($aliasdomain['subdomain']) && substr($aliasdomain['domain'],0,4) != 'www.' && ($aliasdomain['subdomain'] == "www" OR $aliasdomain['subdomain'] == "*")) { - $temp_domains[] = "www." . $aliasdomain['domain']; - } - } - } - - // prevent duplicate - $temp_domains = array_unique($temp_domains); - - // check if domains are reachable to avoid letsencrypt verification errors - $le_rnd_file = uniqid('le-') . '.txt'; - $le_rnd_hash = md5(uniqid('le-', true)); - if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true); - file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); - - $le_domains = array(); - foreach($temp_domains as $temp_domain) { - if(isset($web_config['skip_le_check']) && $web_config['skip_le_check'] == 'y') { - $le_domains[] = $temp_domain; - } else { - $le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file)); - if($le_hash_check == $le_rnd_hash) { - $le_domains[] = $temp_domain; - $app->log("Verified domain " . $temp_domain . " should be reachable for letsencrypt.", LOGLEVEL_DEBUG); - } else { - $app->log("Could not verify domain " . $temp_domain . ", so excluding it from letsencrypt request.", LOGLEVEL_WARN); - } - } - } - $temp_domains = $le_domains; - unset($le_domains); - @unlink('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file); - - // generate cli format - foreach($temp_domains as $temp_domain) { - $lddomain .= (string) " --domains " . $temp_domain; - } - - // useless data - unset($subdomains); - unset($temp_domains); - - if(version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) { - $crt_tmp_file = "/etc/letsencrypt/live/".$domain."/fullchain.pem"; - } else { - $crt_tmp_file = "/etc/letsencrypt/live/".$domain."/cert.pem"; - } - $key_tmp_file = "/etc/letsencrypt/live/".$domain."/privkey.pem"; - $bundle_tmp_file = "/etc/letsencrypt/live/".$domain."/chain.pem"; - if(!is_dir("/etc/letsencrypt/live/".$domain)) { - if(version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) { - $crt_tmp_file = "/etc/letsencrypt/live/www.".$domain."/fullchain.pem"; - } else { - $crt_tmp_file = "/etc/letsencrypt/live/www.".$domain."/cert.pem"; - } - $key_tmp_file = "/etc/letsencrypt/live/www.".$domain."/privkey.pem"; - $bundle_tmp_file = "/etc/letsencrypt/live/www.".$domain."/chain.pem"; - } - $webroot = $data['new']['document_root']."/web"; - - //* check if we have already a Let's Encrypt cert - //if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { - // we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert - if(!empty($lddomain)) { - $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); - $app->log("Let's Encrypt SSL Cert domains: $lddomain", LOGLEVEL_DEBUG); - } - $success = false; - $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); - $letsencrypt = reset($letsencrypt); - if(is_executable($letsencrypt) && !empty($lddomain)) { - $success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); - } - if(!$success) { - // error issuing cert - $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN); - $app->log($letsencrypt_cmd, LOGLEVEL_WARN); - - // if cert already exists, dont remove it. Ex. expired/misstyped/noDnsYet alias domain, api down... - if(!file_exists($crt_tmp_file)) { - $data['new']['ssl_letsencrypt'] = 'n'; - if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; - /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); - /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); - } - } - //} - - //* check is been correctly created - if(file_exists($crt_tmp_file)) { - $date = date("YmdHis"); - //* TODO: check if is a symlink, if target same keep it, either remove it - if(is_file($key_file)) { - $app->system->copy($key_file, $key_file.'.old.'.$date); - $app->system->chmod($key_file.'.old.'.$date, 0400); - $app->system->unlink($key_file); - } - - if ($web_config["website_symlinks_rel"] == 'y') { - $this->create_relative_link(escapeshellcmd($key_tmp_file), escapeshellcmd($key_file)); - } else { - if(@is_link($key_file)) $app->system->unlink($key_file); - if(@file_exists($key_tmp_file)) exec("ln -s ".escapeshellcmd($key_tmp_file)." ".escapeshellcmd($key_file)); - } - - if(is_file($crt_file)) { - $app->system->copy($crt_file, $crt_file.'.old.'.$date); - $app->system->chmod($crt_file.'.old.'.$date, 0400); - $app->system->unlink($crt_file); - } - - if($web_config["website_symlinks_rel"] == 'y') { - $this->create_relative_link(escapeshellcmd($crt_tmp_file), escapeshellcmd($crt_file)); - } else { - if(@is_link($crt_file)) $app->system->unlink($crt_file); - if(@file_exists($crt_tmp_file))exec("ln -s ".escapeshellcmd($crt_tmp_file)." ".escapeshellcmd($crt_file)); - } - - if(is_file($bundle_file)) { - $app->system->copy($bundle_file, $bundle_file.'.old.'.$date); - $app->system->chmod($bundle_file.'.old.'.$date, 0400); - $app->system->unlink($bundle_file); - } - - if($web_config["website_symlinks_rel"] == 'y') { - $this->create_relative_link(escapeshellcmd($bundle_tmp_file), escapeshellcmd($bundle_file)); - } else { - if(@is_link($bundle_file)) $app->system->unlink($bundle_file); - if(@file_exists($bundle_tmp_file)) exec("ln -s ".escapeshellcmd($bundle_tmp_file)." ".escapeshellcmd($bundle_file)); - } - + $success = $app->letsencrypt->request_certificates($data); + if($success) { /* we don't need to store it. /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); - $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); + $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain_id = ?", $data['new']['domain']); + $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain_id = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); + } else { + $data['new']['ssl_letsencrypt'] = 'n'; + if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; + /* Update the DB of the (local) Server */ + $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); + /* Update also the master-DB of the Server-Farm */ + $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); } } if(@is_file($bundle_file)) $vhost_data['has_bundle_cert'] = 1; - //$vhost_data['document_root'] = $data['new']['document_root'].'/' . $web_folder; - // Set SEO Redirect if($data['new']['seo_redirect'] != ''){ $vhost_data['seo_redirect_enabled'] = 1; @@ -2303,7 +2134,7 @@ class apache2_plugin { $command = 'killall -u '.escapeshellcmd($data['old']['system_user']).' ; userdel'; $command .= ' '.escapeshellcmd($data['old']['system_user']); exec($command); - if($apache_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); + if($apache_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); } @@ -2749,8 +2580,8 @@ class apache2_plugin { /* * The webdav - Root needs the group/user as owner and the apache as read and write */ - //$this->_exec('chown ' . $user . ':' . $group . ' ' . escapeshellcmd($documentRoot . '/webdav/')); - //$this->_exec('chmod 770 ' . escapeshellcmd($documentRoot . '/webdav/')); + //$app->system->_exec('chown ' . $user . ':' . $group . ' ' . escapeshellcmd($documentRoot . '/webdav/')); + //$app->system->_exec('chmod 770 ' . escapeshellcmd($documentRoot . '/webdav/')); $app->system->chown($documentRoot . '/webdav', $user); $app->system->chgrp($documentRoot . '/webdav', $group); $app->system->chmod($documentRoot . '/webdav', 0770); @@ -2759,8 +2590,8 @@ class apache2_plugin { * The webdav folder (not the webdav-root!) needs the same (not in ONE step, because the * pwd-files are owned by root) */ - //$this->_exec('chown ' . $user . ':' . $group . ' ' . escapeshellcmd($webdav_user_dir.' -R')); - //$this->_exec('chmod 770 ' . escapeshellcmd($webdav_user_dir.' -R')); + //$app->system->_exec('chown ' . $user . ':' . $group . ' ' . escapeshellcmd($webdav_user_dir.' -R')); + //$app->system->_exec('chmod 770 ' . escapeshellcmd($webdav_user_dir.' -R')); $app->system->chown($webdav_user_dir, $user); $app->system->chgrp($webdav_user_dir, $group); $app->system->chmod($webdav_user_dir, 0770); @@ -3360,28 +3191,13 @@ class apache2_plugin { } if($app->system->is_group('client'.$client_id)){ - $this->_exec('groupdel client'.$client_id); + $app->system->_exec('groupdel client'.$client_id); $app->log('Removed group client'.$client_id, LOGLEVEL_DEBUG); } } } - //* Wrapper for exec function for easier debugging - private function _exec($command) { - global $app; - $out = array(); - $ret = 0; - $app->log('exec: '.$command, LOGLEVEL_DEBUG); - exec($command, $out, $ret); - if($ret != 0) { - $app->log(implode("\n", $out), LOGLEVEL_WARN); - return false; - } else { - return true; - } - } - private function _checkTcp ($host, $port) { $fp = @fsockopen($host, $port, $errno, $errstr, 2); @@ -3394,35 +3210,6 @@ class apache2_plugin { } } - public function create_relative_link($f, $t) { - global $app; - - // $from already exists - $from = realpath($f); - - // realpath requires the traced file to exist - so, lets touch it first, then remove - @$app->system->unlink($t); touch($t); - $to = realpath($t); - @$app->system->unlink($t); - - // Remove from the left side matching path elements from $from and $to - // and get path elements counts - $a1 = explode('/', $from); $a2 = explode('/', $to); - for ($c = 0; $a1[$c] == $a2[$c]; $c++) { - unset($a1[$c]); unset($a2[$c]); - } - $cfrom = implode('/', $a1); - - // Check if a path is fully a subpath of another - no way to create symlink in the case - if (count($a1) == 0 || count($a2) == 0) return false; - - // Add ($cnt_to-1) number of "../" elements to left side of $cfrom - for ($c = 0; $c < (count($a2)-1); $c++) { $cfrom = '../'.$cfrom; } - if(strstr($to,'/etc/letsencrypt/archive/')) $to = str_replace('/etc/letsencrypt/archive/','/etc/letsencrypt/live/',$to); - - return symlink($cfrom, $to); - } - private function _rewrite_quote($string) { return str_replace(array('.', '*', '?', '+'), array('\\.', '\\*', '\\?', '\\+'), $string); } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 8bf5a16637..0964a00c83 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -432,7 +432,7 @@ class nginx_plugin { $groupname = escapeshellcmd($data['new']['system_group']); if($data['new']['system_group'] != '' && !$app->system->is_group($data['new']['system_group'])) { exec('groupadd '.$fixed_gid_param.' '.$groupname); - if($nginx_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' groupadd '.$groupname); + if($nginx_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' groupadd '.$groupname); $app->log('Adding the group: '.$groupname, LOGLEVEL_DEBUG); } @@ -440,10 +440,10 @@ class nginx_plugin { if($data['new']['system_user'] != '' && !$app->system->is_user($data['new']['system_user'])) { if($web_config['add_web_users_to_sshusers_group'] == 'y') { exec('useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param -G sshusers $username -s /bin/false"); - if($nginx_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param -G sshusers $username -s /bin/false"); + if($nginx_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param -G sshusers $username -s /bin/false"); } else { exec('useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param $username -s /bin/false"); - if($nginx_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param $username -s /bin/false"); + if($nginx_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' useradd -d '.escapeshellcmd($data['new']['document_root'])." -g $groupname $fixed_uid_param $username -s /bin/false"); } $app->log('Adding the user: '.$username, LOGLEVEL_DEBUG); } @@ -513,7 +513,7 @@ class nginx_plugin { exec($command); } - if($nginx_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); + if($nginx_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); //* Change the log mount /* @@ -632,7 +632,7 @@ class nginx_plugin { if(!is_link($tmp_symlink)) { // exec("ln -s ".escapeshellcmd($data["new"]["document_root"])."/ ".escapeshellcmd($tmp_symlink)); if ($web_config["website_symlinks_rel"] == 'y') { - $this->create_relative_link(escapeshellcmd($data["new"]["document_root"]), escapeshellcmd($tmp_symlink)); + $app->system->create_relative_link(escapeshellcmd($data["new"]["document_root"]), escapeshellcmd($tmp_symlink)); } else { exec("ln -s ".escapeshellcmd($data["new"]["document_root"])."/ ".escapeshellcmd($tmp_symlink)); } @@ -753,12 +753,12 @@ class nginx_plugin { if($this->action == 'insert' || $data["new"]["system_user"] != $data["old"]["system_user"]) { // Chown and chmod the directories below the document root - $this->_exec('chown -R '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); + $app->system->_exec('chown -R '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); // The document root itself has to be owned by root in normal level and by the web owner in security level 20 if($web_config['security_level'] == 20) { - $this->_exec('chown '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); + $app->system->_exec('chown '.$username.':'.$groupname.' '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); } else { - $this->_exec('chown root:root '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); + $app->system->_exec('chown root:root '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder); } } @@ -794,12 +794,12 @@ class nginx_plugin { $command = 'usermod'; $command .= ' --groups sshusers'; $command .= ' '.escapeshellcmd($data['new']['system_user']).' 2>/dev/null'; - $this->_exec($command); + $app->system->_exec($command); } //* if we have a chrooted nginx environment if($nginx_chrooted) { - $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); + $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); //* add the nginx user to the client group in the chroot environment $tmp_groupfile = $app->system->server_conf['group_datei']; @@ -1213,35 +1213,19 @@ class nginx_plugin { } $tpl->setLoop('nginx_directives', $final_nginx_directives); + $app->uses('letsencrypt'); // Check if a SSL cert exists - $ssl_dir = $data['new']['document_root'].'/ssl'; - $domain = $data['new']['ssl_domain']; - if(!$domain) $domain = $data['new']['domain']; - $tpl->setVar('ssl_domain', $domain); - $key_file = $ssl_dir.'/'.$domain.'.key'; - $key_file2 = $ssl_dir.'/'.$domain.'.key.org'; - $csr_file = $ssl_dir.'/'.$domain.'.csr'; - $crt_file = $ssl_dir.'/'.$domain.'.crt'; - - $tpl->setVar('ssl_letsencrypt', "n"); - - if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') { - $domain = $data['new']['domain']; - if(substr($domain, 0, 2) === '*.') { - // wildcard domain not yet supported by letsencrypt! - $app->log('Wildcard domains not yet supported by letsencrypt, so changing ' . $domain . ' to ' . substr($domain, 2), LOGLEVEL_WARN); - $domain = substr($domain, 2); - } - - $data['new']['ssl_domain'] = $domain; - $vhost_data['ssl_domain'] = $domain; - - $key_file = $ssl_dir.'/'.$domain.'-le.key'; - $key_file2 = $ssl_dir.'/'.$domain.'-le.key.org'; - $crt_file = $ssl_dir.'/'.$domain.'-le.crt'; - $bundle_file = $ssl_dir.'/'.$domain.'-le.bundle'; - } - + $tmp = $app->letsencrypt->get_website_certificate_paths($data); + $domain = $tmp['domain']; + $key_file = $tmp['key']; + $key_file2 = $tmp['key2']; + $csr_file = $tmp['csr']; + $crt_file = $tmp['crt']; + $bundle_file = $tmp['bundle']; + unset($tmp); + + $data['new']['ssl_domain'] = $domain; + $vhost_data['ssl_domain'] = $domain; $vhost_data['ssl_crt_file'] = $crt_file; $vhost_data['ssl_key_file'] = $key_file; $vhost_data['ssl_bundle_file'] = $bundle_file; @@ -1253,151 +1237,23 @@ class nginx_plugin { || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain || $this->update_letsencrypt == true )) { - // default values - $temp_domains = array($domain); - $lddomain = ''; - $subdomains = null; - $aliasdomains = null; - $sub_prefixes = array(); - - //* be sure to have good domain - if(substr($domain,0,4) != 'www.' && ($data['new']['subdomain'] == "www" OR $data['new']['subdomain'] == "*")) { - $temp_domains[] = "www." . $domain; - } - - //* then, add subdomain if we have - $subdomains = $app->db->queryAllRecords('SELECT domain FROM web_domain WHERE parent_domain_id = '.intval($data['new']['domain_id'])." AND active = 'y' AND type = 'subdomain'"); - if(is_array($subdomains)) { - foreach($subdomains as $subdomain) { - $temp_domains[] = $subdomain['domain']; - $sub_prefixes[] = str_replace($domain, "", $subdomain['domain']); - } - } - //* then, add alias domain if we have - $aliasdomains = $app->db->queryAllRecords('SELECT domain,subdomain FROM web_domain WHERE parent_domain_id = '.intval($data['new']['domain_id'])." AND active = 'y' AND type = 'alias'"); - if(is_array($aliasdomains)) { - foreach($aliasdomains as $aliasdomain) { - $temp_domains[] = $aliasdomain['domain']; - if(isset($aliasdomain['subdomain']) && substr($aliasdomain['domain'],0,4) != 'www.' && ($aliasdomain['subdomain'] == "www" OR $aliasdomain['subdomain'] == "*")) { - $temp_domains[] = "www." . $aliasdomain['domain']; - } - - foreach($sub_prefixes as $s) { - $temp_domains[] = $s . $aliasdomain['domain']; - } - } - } - - // prevent duplicate - $temp_domains = array_unique($temp_domains); - - // check if domains are reachable to avoid letsencrypt verification errors - $le_rnd_file = uniqid('le-') . '.txt'; - $le_rnd_hash = md5(uniqid('le-', true)); - if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true); - file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); - - $le_domains = array(); - foreach($temp_domains as $temp_domain) { - if(isset($web_config['skip_le_check']) && $web_config['skip_le_check'] == 'y') { - $le_domains[] = $temp_domain; - } else { - $le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file)); - if($le_hash_check == $le_rnd_hash) { - $le_domains[] = $temp_domain; - $app->log("Verified domain " . $temp_domain . " should be reachable for letsencrypt.", LOGLEVEL_DEBUG); - } else { - $app->log("Could not verify domain " . $temp_domain . ", so excluding it from letsencrypt request.", LOGLEVEL_WARN); - } - } - } - $temp_domains = $le_domains; - unset($le_domains); - @unlink('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file); - - // generate cli format - foreach($temp_domains as $temp_domain) { - $lddomain .= (string) " --domains " . $temp_domain; - } - - // useless data - unset($subdomains); - unset($temp_domains); - - $tpl->setVar('ssl_letsencrypt', "y"); - //* TODO: check dns entry is correct - $crt_tmp_file = "/etc/letsencrypt/live/".$domain."/fullchain.pem"; - $key_tmp_file = "/etc/letsencrypt/live/".$domain."/privkey.pem"; - if(!is_dir("/etc/letsencrypt/live/".$domain)) { - $crt_tmp_file = "/etc/letsencrypt/live/www.".$domain."/fullchain.pem"; - $key_tmp_file = "/etc/letsencrypt/live/www.".$domain."/privkey.pem"; - } - $webroot = $data['new']['document_root']."/web"; - - //* check if we have already a Let's Encrypt cert - //if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { - // we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert - if(!empty($lddomain)) { - $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); - $app->log("Let's Encrypt SSL Cert domains: $lddomain", LOGLEVEL_DEBUG); - } - - $success = false; - $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); - $letsencrypt = reset($letsencrypt); - if(is_executable($letsencrypt) && !empty($lddomain)) { - $success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); - } - if(!$success) { - // error issuing cert - $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN); - $data['new']['ssl_letsencrypt'] = 'n'; - if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; - /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); - /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); - } - //} - - //* check is been correctly created - if(file_exists($crt_tmp_file)) { - $date = date("YmdHis"); - //* TODO: check if is a symlink, if target same keep it, either remove it - if(is_file($key_file)) { - $app->system->copy($key_file, $key_file.'.old.'.$date); - $app->system->chmod($key_file.'.old.'.$date, 0400); - $app->system->unlink($key_file); - } - - if ($web_config["website_symlinks_rel"] == 'y') { - $this->create_relative_link(escapeshellcmd($key_tmp_file), escapeshellcmd($key_file)); - } else { - if(@is_link($key_file)) $app->system->unlink($key_file); - if(@file_exists($key_tmp_file)) exec("ln -s ".escapeshellcmd($key_tmp_file)." ".escapeshellcmd($key_file)); - } - - if(is_file($crt_file)) { - $app->system->copy($crt_file, $crt_file.'.old.'.$date); - $app->system->chmod($crt_file.'.old.'.$date, 0400); - $app->system->unlink($crt_file); - } - - if($web_config["website_symlinks_rel"] == 'y') { - $this->create_relative_link(escapeshellcmd($crt_tmp_file), escapeshellcmd($crt_file)); - } else { - if(@is_link($crt_file)) $app->system->unlink($crt_file); - if(@file_exists($crt_tmp_file))exec("ln -s ".escapeshellcmd($crt_tmp_file)." ".escapeshellcmd($crt_file)); - } - + $success = $app->letsencrypt->request_certificates($data, 'nginx'); + if($success) { /* we don't need to store it. /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); - $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); + $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain_id = ?", $data['new']['domain']); + $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain_id = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); + } else { + $data['new']['ssl_letsencrypt'] = 'n'; + if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; + /* Update the DB of the (local) Server */ + $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); + /* Update also the master-DB of the Server-Farm */ + $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); } } @@ -1424,8 +1280,6 @@ class nginx_plugin { $vhost_data['seo_redirect_enabled'] = 0; } - - // Rewrite rules $own_rewrite_rules = array(); $rewrite_rules = array(); @@ -2344,7 +2198,7 @@ class nginx_plugin { $command = 'killall -u '.escapeshellcmd($data['old']['system_user']).' ; userdel'; $command .= ' '.escapeshellcmd($data['old']['system_user']); exec($command); - if($nginx_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); + if($nginx_chrooted) $app->system->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); } @@ -3133,24 +2987,13 @@ class nginx_plugin { } if($app->system->is_group('client'.$client_id)){ - $this->_exec('groupdel client'.$client_id); + $app->system->_exec('groupdel client'.$client_id); $app->log('Removed group client'.$client_id, LOGLEVEL_DEBUG); } } } - //* Wrapper for exec function for easier debugging - private function _exec($command) { - global $app; - $out = array(); - $ret = 0; - $app->log('exec: '.$command, LOGLEVEL_DEBUG); - exec($command, $out, $ret); - if($ret != 0) return false; - else return true; - } - private function _checkTcp ($host, $port) { $fp = @fsockopen($host, $port, $errno, $errstr, 2); @@ -3163,34 +3006,6 @@ class nginx_plugin { } } - public function create_relative_link($f, $t) { - global $app; - - // $from already exists - $from = realpath($f); - - // realpath requires the traced file to exist - so, lets touch it first, then remove - @$app->system->unlink($t); touch($t); - $to = realpath($t); - @$app->system->unlink($t); - - // Remove from the left side matching path elements from $from and $to - // and get path elements counts - $a1 = explode('/', $from); $a2 = explode('/', $to); - for ($c = 0; $a1[$c] == $a2[$c]; $c++) { - unset($a1[$c]); unset($a2[$c]); - } - $cfrom = implode('/', $a1); - - // Check if a path is fully a subpath of another - no way to create symlink in the case - if (count($a1) == 0 || count($a2) == 0) return false; - - // Add ($cnt_to-1) number of "../" elements to left side of $cfrom - for ($c = 0; $c < (count($a2)-1); $c++) { $cfrom = '../'.$cfrom; } - - return symlink($cfrom, $to); - } - private function _rewrite_quote($string) { return str_replace(array('.', '*', '?', '+'), array('\\.', '\\*', '\\?', '\\+'), $string); } -- GitLab From 9c78e6917a2181f2fe29d62e02a64b30bd1c334d Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 11 Jul 2017 23:00:51 +0800 Subject: [PATCH 221/302] Static AuthName --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 56827513bd..c07a62c02a 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2746,7 +2746,7 @@ class apache2_plugin { $output .= "Dav On\n"; $output .= "BrowserMatch MSIE AuthDigestEnableQueryStringHack=On\n"; $output .= "AuthType Digest\n"; - $output .= "AuthName \"$fn\"\n"; + $output .= "AuthName \"Restricted Area\"\n"; $output .= "AuthUserFile $webdavRoot/$file\n"; $output .= "Require valid-user\n"; $output .= "Options +Indexes\n"; -- GitLab From 0f20b7ca9099b42504f6592332c2d9afca91f4db Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Thu, 13 Jul 2017 14:48:49 +0200 Subject: [PATCH 222/302] - colorize output in installer --- install/install.php | 22 ++-- install/lib/classes/libbashcolor.inc.php | 160 +++++++++++++++++++++++ install/lib/install.lib.php | 6 +- 3 files changed, 176 insertions(+), 12 deletions(-) create mode 100644 install/lib/classes/libbashcolor.inc.php diff --git a/install/install.php b/install/install.php index 1371bcbb17..25e7900321 100644 --- a/install/install.php +++ b/install/install.php @@ -57,19 +57,21 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ error_reporting(E_ALL|E_STRICT); +require_once realpath(dirname(__FILE__)) . '/lib/classes/libbashcolor.inc.php'; define('INSTALLER_RUN', true); //** The banner on the command line echo "\n\n".str_repeat('-', 80)."\n"; -echo " _____ ___________ _____ __ _ ____ -|_ _/ ___| ___ \ / __ \ / _(_) /__ \ - | | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ / - | | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ | - _| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \ - \___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/ +echo PXBashColor::getString( " + _____ ___________ _____ __ _ ____ +|_ _/ ___| ___ \ / __ \ / _(_) /__ \ + | | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ / + | | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ | + _| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \ + \___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/ __/ | - |___/ "; + |___/ "); echo "\n".str_repeat('-', 80)."\n"; echo "\n\n>> Initial configuration \n\n"; @@ -148,12 +150,12 @@ $retval=shell_exec("which which"); if (empty($retval)) die ("ISPConfig requieres which \n"); swriteln($inst->lng(' Following will be a few questions for primary configuration so be careful.')); -swriteln($inst->lng(' Default values are in [brackets] and can be accepted with .')); -swriteln($inst->lng(' Tap in "quit" (without the quotes) to stop the installer.'."\n\n")); +swriteln($inst->lng(' Default values are in [brackets] and can be accepted with .')); +swriteln($inst->lng(' Tap in "quit" (without the quotes) to stop the installer.'."\n\n")); //** Check log file is writable (probably not root or sudo) if(!is_writable(dirname(ISPC_LOG_FILE))){ - die("ERROR: Cannot write to the ".dirname(ISPC_LOG_FILE)." directory. Are you root or sudo ?\n\n"); + die(PXBashColor::getString("[ERROR] Cannot write to the ".dirname(ISPC_LOG_FILE)." directory. Are you root or sudo ?\n\n")); } if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) { diff --git a/install/lib/classes/libbashcolor.inc.php b/install/lib/classes/libbashcolor.inc.php new file mode 100644 index 0000000000..b4bcda6af0 --- /dev/null +++ b/install/lib/classes/libbashcolor.inc.php @@ -0,0 +1,160 @@ + 30, + 'red' => 31, + 'green' => 32, + 'yellow' => 33, + 'blue' => 34, + 'magenta' => 35, + 'cyan' => 36, + 'lightgrey' => 37, + 'default' => 39, + 'darkgrey' => 90, + 'lightred' => 91, + 'lightgreen' => 92, + 'lightyellow' => 93, + 'lightblue' => 94, + 'lightmagenta' => 95, + 'lightcyan' => 96, + 'white' => 97, + + 'bg:black' => 40, + 'bg:red' => 41, + 'bg:green' => 42, + 'bg:yellow' => 43, + 'bg:blue' => 44, + 'bg:magenta' => 45, + 'bg:cyan' => 46, + 'bg:lightgrey' => 47, + 'bg:default' => 49, + 'bg:darkgrey' => 100, + 'bg:lightred' => 101, + 'bg:lightgreen' => 102, + 'bg:lightyellow' => 103, + 'bg:lightblue' => 104, + 'bg:lightmagenta' => 105, + 'bg:lightcyan' => 106, + 'bg:white' => 107, + + 'bold' => 1, + 'dim' => 2, + 'italic' => 3, + 'underlined' => 4, + 'blink' => 5, + 'invert' => 7, + 'hidden' => 8 + + ); + + private static function getCode($active) { + $code = "\033[0;"; + if(count($active) > 0) { + $tmp = array(); + for($i = 0; $i < count($active); $i++) { + $tmp[] = self::$markers[$active[$i]]; + } + sort($tmp); + $code .= implode(';', $tmp); + unset($tmp); + } else { + $code .= "0"; + } + + $code .= "m"; + return $code; + } + + public static function getString($string, $ignore_unknown_tags = false) { + + $active = array(); + $echo_string = ""; + + while(preg_match('/<(\/?(?:bg:)?\w+)>/i', $string, $match, PREG_OFFSET_CAPTURE)) { + $pos = $match[0][1]; + $tag = $match[1][0]; + $len = strlen($match[0][0]); + + $close = false; + if(substr($tag, 0, 1) == '/') { + $close = true; + $tag = substr($tag, 1); + } + + $key = $tag; + if($key == 'strong' || $key == 'b') $key = 'bold'; + elseif($key == 'em' || $key == 'i') $key = 'italic'; + elseif($key == 'u') $key = 'underlined'; + elseif($key == 'inv') $key = 'invert'; + + if(!array_key_exists($key, self::$markers)) { + if($ignore_unknown_tags == false) { + throw new Exception('unknown tag: ' . $tag); + } else { + $echo_string .= self::getCode($active); + $echo_string .= substr($string, 0, $pos + $len); + $string = substr($string, $pos + $len); + continue; + } + } + + if($pos > 0) { + $echo_string .= self::getCode($active); + $echo_string .= substr($string, 0, $pos); + } + + if($close == true) { + $last = end($active); + if($key != $last) { + throw new Exception('unbalanced tag: ' . $tag . ' (' . $last . ' expected), ' . var_export($active, true)); + } + array_pop($active); + } else { + array_push($active, $key); + } + + $string = substr($string, $pos + $len); + } + + if($string != '') { + $echo_string .= self::getCode($active); + $echo_string .= $string; + } + + $echo_string .= "\e[0m"; + return $echo_string; + } + +} \ No newline at end of file diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 476ac8fca1..4ee6f9d725 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -32,6 +32,8 @@ error_reporting(E_ALL|E_STRICT); $FILE = realpath('../install.php'); +require_once realpath(dirname(__FILE__)) . '/classes/libbashcolor.inc.php'; + //** Get distribution identifier //** IMPORTANT! // This is the same code as in server/lib/classes/monitor_tools.inc.php @@ -214,7 +216,7 @@ function get_distname() { $distconfid = 'debian90'; $distid = 'debian60'; $distbaseid = 'debian'; - swriteln("Operating System: Debian 9.0 (Stretch) or compatible\n"); + swriteln("Operating System: Debian 9.0 (Stretch) or compatible\n"); } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; @@ -379,7 +381,7 @@ function swrite($text = '') { } function swriteln($text = '') { - echo $text."\n"; + echo PXBashColor::getString($text, true)."\n"; } function ilog($msg){ -- GitLab From 22afe30e67062c5bc7d0badbef2d0781906f88ac Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sun, 23 Jul 2017 13:41:48 +0800 Subject: [PATCH 223/302] replaced deban90 with debian60 --- install/lib/install.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 4ee6f9d725..84772eedba 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -220,7 +220,7 @@ function get_distname() { } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; - $distid = 'debian90'; + $distid = 'debian60'; $distconfid = 'debiantesting'; $distbaseid = 'debian'; swriteln("Operating System: Debian Testing\n"); -- GitLab From 4b85a8ae4984cfffe8b07d0fd31dcb2311b99e1f Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Sun, 23 Jul 2017 11:50:07 +0200 Subject: [PATCH 224/302] update bind-template (Fixes #4723) --- server/conf/bind_pri.domain.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/conf/bind_pri.domain.master b/server/conf/bind_pri.domain.master index 29badac7ac..897ece496c 100644 --- a/server/conf/bind_pri.domain.master +++ b/server/conf/bind_pri.domain.master @@ -21,7 +21,7 @@ $TTL {tmpl_var name='ttl'} {tmpl_var name='name'} {tmpl_var name='ttl'} CNAME {tmpl_var name='data'}
-{tmpl_var name='name'} {tmpl_var name='ttl'} CAA 0 {tmpl_var name='data'} +{tmpl_var name='name'} {tmpl_var name='ttl'} CAA {tmpl_var name='data'} {tmpl_var name='name'} {tmpl_var name='ttl'} CNAME {tmpl_var name='data'} -- GitLab From 94faaec031b093fd7d9ed1d81a941ca078fb63b3 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sun, 23 Jul 2017 19:39:51 +0800 Subject: [PATCH 225/302] changed debian90 to debian60 --- server/lib/classes/monitor_tools.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 3a83815a83..fa2c4d6817 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -206,7 +206,7 @@ class monitor_tools { } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; - $distid = 'debian90'; + $distid = 'debian60'; $distconfid = 'debiantesting'; $distbaseid = 'debian'; } else { -- GitLab From a65cc1ddb80f83b57d58694c8b403ab890aaec68 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Mon, 24 Jul 2017 17:50:45 +0200 Subject: [PATCH 226/302] Implemented proxy script to fix #4688 --- interface/web/monitor/iframe_proxy.php | 152 +++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 interface/web/monitor/iframe_proxy.php diff --git a/interface/web/monitor/iframe_proxy.php b/interface/web/monitor/iframe_proxy.php new file mode 100644 index 0000000000..321659ebce --- /dev/null +++ b/interface/web/monitor/iframe_proxy.php @@ -0,0 +1,152 @@ +auth->check_module_permissions('monitor'); + + +$app->uses('getconf'); +$server_config = $app->getconf->get_server_config($_SESSION['monitor']['server_id'], 'server'); + + +$context = !empty($_GET['context']) ? trim($_GET['context']) : ''; + +$proxy_url = ''; +$http_user = ''; +$http_password = ''; +if(isset($server_config[$context . '_url'])) +{ + $proxy_url = $server_config[$context . '_url']; + $proxy_url = str_replace('[SERVERNAME]', $server_config['hostname'], $proxy_url); + + if(isset($_GET['url'])) + { + $proxy_url .= urldecode($_GET['url']); + } + + $http_user = trim($server_config[$context . '_user']); + $http_password = trim($server_config[$context . '_password']); +} +else +{ + header('HTTP/1.1 500'); + echo 'Invalid Context-Parameter.'; + exit; +} + +$response = null; + +try +{ + if(isset($http_user) || isset($http_password)) + { + $proxy_url = str_replace('://', sprintf('://%s:%s@', $http_user, $http_password), $proxy_url); + } + + if(empty($proxy_url)) + { + header('HTTP/1.1 500'); + echo 'Invalid/Empty request.'; + exit; + } + + $ch = curl_init($proxy_url); + if($ch) + { + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); + curl_setopt($ch, CURLOPT_TIMEOUT, 20); + curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); + + //curl_setopt($ch, CURLOPT_VERBOSE, true); + curl_setopt($ch, CURLINFO_HEADER_OUT, true); + + $response = curl_exec($ch); + $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + + if(empty($response_code) || empty($response)) + { + throw new \Exception('HTTP Sub-Request failed.'); + } + + // HTML-Rewrites + if(strpos($response, ' Date: Tue, 25 Jul 2017 20:11:55 +0200 Subject: [PATCH 227/302] Updated monitor/show_monit.php to use new proxy script. --- interface/web/monitor/show_monit.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/interface/web/monitor/show_monit.php b/interface/web/monitor/show_monit.php index 7bd69df43f..8c6903d042 100644 --- a/interface/web/monitor/show_monit.php +++ b/interface/web/monitor/show_monit.php @@ -48,11 +48,20 @@ $app->tpl->setVar("list_head_txt", $title); if($_SESSION["s"]["user"]["typ"] == 'admin'){ + /* $app->uses('getconf'); $server_config = $app->getconf->get_server_config($_SESSION['monitor']['server_id'], 'server'); - $monit_url = trim($server_config['monit_url']); + */ + + $monit_url = sprintf( + '%s://%s/monitor/iframe_proxy.php?context=monit', + (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http', + $_SERVER['HTTP_HOST'] + ); + if($monit_url != ''){ + /* $monit_url = str_replace('[SERVERNAME]', $_SESSION['monitor']['server_name'], $monit_url); $monit_user = trim($server_config['monit_user']); $monit_password = trim($server_config['monit_password']); @@ -68,7 +77,7 @@ if($_SESSION["s"]["user"]["typ"] == 'admin'){ $monit_url_parts = parse_url($monit_url); $monit_url = $monit_url_parts['scheme'].'://'.$auth_string.$monit_url_parts['host'].(isset($monit_url_parts['port']) ? ':' . $monit_url_parts['port'] : '').(isset($monit_url_parts['path']) ? $monit_url_parts['path'] : '').(isset($monit_url_parts['query']) ? '?' . $monit_url_parts['query'] : '').(isset($monit_url_parts['fragment']) ? '#' . $monit_url_parts['fragment'] : ''); - + */ $app->tpl->setVar("monit_url", $monit_url); } else { $app->tpl->setVar("no_monit_url_defined_txt", $app->lng("no_monit_url_defined_txt")); -- GitLab From 680bb844ce147be694c83ff8404e1829a9371093 Mon Sep 17 00:00:00 2001 From: Jakub Kalousek Date: Thu, 27 Jul 2017 12:51:05 +0200 Subject: [PATCH 228/302] Fixed DATE Format issues (#4732) --- interface/lib/lang/cz.lng | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng index b20e9358ec..ac2834f0d0 100644 --- a/interface/lib/lang/cz.lng +++ b/interface/lib/lang/cz.lng @@ -1,9 +1,9 @@ Date: Mon, 7 Aug 2017 15:56:36 +0800 Subject: [PATCH 229/302] fixes small bug --- server/lib/classes/letsencrypt.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php index af770723f5..7d5194cf39 100644 --- a/server/lib/classes/letsencrypt.inc.php +++ b/server/lib/classes/letsencrypt.inc.php @@ -227,7 +227,7 @@ class letsencrypt { // check if domains are reachable to avoid letsencrypt verification errors $le_rnd_file = uniqid('le-') . '.txt'; $le_rnd_hash = md5(uniqid('le-', true)); - if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/')) { + if(!is_dir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/')) { $app->system->mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/', false, 0755, true); } file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); -- GitLab From df7e02a03ca3bdb26debff69d2ecbb05b1062248 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Tue, 8 Aug 2017 20:50:10 +0200 Subject: [PATCH 230/302] Fixed syntax error. --- interface/web/admin/lib/lang/en_server_config.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index 6afda0b21b..b851dae68f 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -287,7 +287,7 @@ $wb['xmpp_port_pastebin_txt'] = 'Pastebin'; $wb['xmpp_port_bosh_txt'] = 'BOSH'; $wb["disable_bind_log_txt"] = "Disable bind9 messages for Loglevel WARN"; $wb["apps_vhost_enabled_txt"] = "Apps-vhost enabled"; -$wb["mailinglist_manager_txt"] = 'Mailinglist Manager' +$wb["mailinglist_manager_txt"] = 'Mailinglist Manager'; $wb['skip_le_check_txt'] = 'Skip Lets Encrypt Check'; $wb['migration_mode_txt'] = 'Server Migration Mode'; ?> -- GitLab From 1295a8a9b797da0ef859cfba98029fb8beee8584 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 14 Aug 2017 15:56:30 +0800 Subject: [PATCH 231/302] changed php-cgi to php-cgi7.0 --- install/dist/conf/debian90.conf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dist/conf/debian90.conf.php b/install/dist/conf/debian90.conf.php index d7c70de870..7b3c2e365c 100644 --- a/install/dist/conf/debian90.conf.php +++ b/install/dist/conf/debian90.conf.php @@ -101,7 +101,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps'; //* Fastcgi $conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/7.0/cgi/'; $conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/'; -$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi'; +$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi7.0'; //* Postfix $conf['postfix']['installed'] = false; // will be detected automatically during installation -- GitLab From 349a82c44cb8b2e2e67e6a4f5b1edfcabccf3a66 Mon Sep 17 00:00:00 2001 From: Luis Garnica Guilarte Date: Thu, 17 Aug 2017 13:57:31 +0200 Subject: [PATCH 232/302] Update missing translations in es.lng --- interface/web/login/lib/lang/es.lng | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/web/login/lib/lang/es.lng b/interface/web/login/lib/lang/es.lng index c7576d509d..ccd34f244c 100755 --- a/interface/web/login/lib/lang/es.lng +++ b/interface/web/login/lib/lang/es.lng @@ -25,10 +25,10 @@ $wb['stay_logged_in_txt'] = 'Permanecer conectado'; $wb['theme_not_compatible'] = 'El tema elegido no es compatible con la versión actual. Por favor busca una nueva versión del tema.
Se ha activado el tema por defecto automáticamente.'; $wb['user_regex_error'] = 'El nombre de usuario contiene caracteres no permitidos o tiene más de 64 caracteres.'; $wb['username_txt'] = 'Nombre de usuario'; -$wb['pw_reset_act'] = 'You have been sent an activation link. Please visit the link to confirm your password request.'; -$wb['pw_reset_act_mail_title'] = 'Confirm ISPConfig 3 Control panel password reset'; -$wb['pw_reset_act_mail_msg'] = 'Please confirm that your want to reset your ISPConfig 3 control panel account password by visiting the following activation link: '; -$wb['lost_password_function_wait_txt'] = 'You cannot request a new password, yet. Please wait a few minutes.'; -$wb['lost_password_function_expired_txt'] = 'This activation link has expired. Please request a new one.'; -$wb['lost_password_function_denied_txt'] = 'This activation link is not valid.'; +$wb['pw_reset_act'] = 'Se le ha eniado un enlace de activación. Por favor visite el enlace para confirmar la petición de cambio de contraseña.'; +$wb['pw_reset_act_mail_title'] = 'Confirmar restablecer la contraseña del panel de control ISPConfig 3'; +$wb['pw_reset_act_mail_msg'] = 'Por favor confirme que desea restablecer la contraseña de su panel de control ISPConfig 3 visitando el siguiente enlace de activación: '; +$wb['lost_password_function_wait_txt'] = 'No puede solicitar una nueva contraseña todavía. Por favor, espere unos minutos.'; +$wb['lost_password_function_expired_txt'] = 'Este enlace de activación ha caducado. Por favor, solicite uno nuevo.'; +$wb['lost_password_function_denied_txt'] = 'Este enlace de activación no es válido.'; ?> -- GitLab From c629dcedd7aaf3660a0e871fae0b43c80cdace69 Mon Sep 17 00:00:00 2001 From: Luis Garnica G Date: Thu, 17 Aug 2017 14:07:24 +0200 Subject: [PATCH 233/302] Update missing translations in es_login_as.lng --- interface/web/login/lib/lang/es_login_as.lng | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/login/lib/lang/es_login_as.lng b/interface/web/login/lib/lang/es_login_as.lng index 2abb6cf906..b235675a6f 100755 --- a/interface/web/login/lib/lang/es_login_as.lng +++ b/interface/web/login/lib/lang/es_login_as.lng @@ -8,7 +8,7 @@ $wb['login_2_txt'] = 'Si lo hace, puede \\"volver\\" haciendo clic en salir.'; $wb['tcp_ports_error_regex'] = 'Caracteres no permitidos en la definición de puertos tcp. Los caracteres permitidos son: números, \\":\\" y \\",\\".'; $wb['udp_port_help_txt'] = 'Separado por comas'; $wb['udp_ports_error_regex'] = 'Caracteres no permitidos en la definición de puertos udp. Los caracteres permitidos son: números, \\":\\" y \\",\\".'; -$wb['login_as_or_logout_txt'] = 'Do you want to re-login as {UTYPE} or logout?'; -$wb['btn_reloginas_txt'] = 'Yes, re-login as %s'; -$wb['btn_nologout_txt'] = 'No, logout'; +$wb['login_as_or_logout_txt'] = '¿Desea reiniciar sesión como {UTYPE} o terminar sesión?'; +$wb['btn_reloginas_txt'] = 'Sí, reiniciar como %s'; +$wb['btn_nologout_txt'] = 'No, terminar sesión'; ?> \ No newline at end of file -- GitLab From ba11e7316427dfe11003478c96216ea1138ae34e Mon Sep 17 00:00:00 2001 From: Timo Boldt Date: Thu, 17 Aug 2017 14:59:41 +0200 Subject: [PATCH 234/302] fixed hostnames with special characters --- interface/web/sites/web_sites_stats.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/interface/web/sites/web_sites_stats.php b/interface/web/sites/web_sites_stats.php index 16c40d43ed..e5f6b02510 100644 --- a/interface/web/sites/web_sites_stats.php +++ b/interface/web/sites/web_sites_stats.php @@ -31,6 +31,7 @@ class list_action extends listform_actions { global $app; $rec = $app->listform->decode($rec); + $domain = $app->functions->idn_encode(html_entity_decode($rec['domain'])); //* Alternating datarow colors $this->DataRowColor = ($this->DataRowColor == '#FFFFFF') ? '#EEEEEE' : '#FFFFFF'; @@ -40,26 +41,26 @@ class list_action extends listform_actions { //** Traffic of the current month $tmp_year = date('Y'); $tmp_month = date('m'); - $tmp_rec = $app->db->queryOneRecord("SELECT SUM(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ? AND MONTH(traffic_date) = ?", $rec['domain'], $tmp_year, $tmp_month); + $tmp_rec = $app->db->queryOneRecord("SELECT SUM(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ? AND MONTH(traffic_date) = ?", $domain, $tmp_year, $tmp_month); $rec['this_month'] = $app->functions->formatBytes($tmp_rec['t']); $this->sum_this_month += $tmp_rec['t']; //** Traffic of the current year - $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ?", $rec['domain'], $tmp_year); + $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ?", $domain, $tmp_year); $rec['this_year'] = $app->functions->formatBytes($tmp_rec['t']); $this->sum_this_year += $tmp_rec['t']; //** Traffic of the last month $tmp_year = date('Y', mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); $tmp_month = date('m', mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); - $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ? AND MONTH(traffic_date) = ?", $rec['domain'], $tmp_year, $tmp_month); + $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ? AND MONTH(traffic_date) = ?", $domain, $tmp_year, $tmp_month); $rec['last_month'] = $app->functions->formatBytes($tmp_rec['t']); $this->sum_last_month += $tmp_rec['t']; //** Traffic of the last year $tmp_year = date('Y', mktime(0, 0, 0, date("m"), date("d"), date("Y")-1)); - $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ?", $rec['domain'], $tmp_year); + $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ?", $domain, $tmp_year); $rec['last_year'] = $app->functions->formatBytes($tmp_rec['t']); $this->sum_last_year += $tmp_rec['t']; -- GitLab From 9eb0a7251f0802cca40a4f3cc96f6eb8a2081c14 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Thu, 17 Aug 2017 15:17:25 +0200 Subject: [PATCH 235/302] - smaller change to handling of domain (!628) --- interface/web/sites/web_sites_stats.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/sites/web_sites_stats.php b/interface/web/sites/web_sites_stats.php index e5f6b02510..488bf0363d 100644 --- a/interface/web/sites/web_sites_stats.php +++ b/interface/web/sites/web_sites_stats.php @@ -30,9 +30,9 @@ class list_action extends listform_actions { { global $app; + $domain = $rec['domain']; $rec = $app->listform->decode($rec); - $domain = $app->functions->idn_encode(html_entity_decode($rec['domain'])); - + //* Alternating datarow colors $this->DataRowColor = ($this->DataRowColor == '#FFFFFF') ? '#EEEEEE' : '#FFFFFF'; $rec['bgcolor'] = $this->DataRowColor; -- GitLab From 07b2f3e335ea91af238e3f4c62ac4744201e02ac Mon Sep 17 00:00:00 2001 From: Luis Garnica G Date: Thu, 17 Aug 2017 19:22:58 +0200 Subject: [PATCH 236/302] Update missing translations in es.lng --- interface/lib/lang/es.lng | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng index 506629c945..eebec59957 100644 --- a/interface/lib/lang/es.lng +++ b/interface/lib/lang/es.lng @@ -152,11 +152,11 @@ $wb['security_check1_txt'] = 'Verificar permisos de seguridad:'; $wb['security_check2_txt'] = 'ha fallado.'; $wb['select_directive_snippet_txt'] = 'Directive Snippets'; $wb['select_master_directive_snippet_txt'] = 'Master Directive Snippets'; -$wb['datalog_status_i_xmpp_domain'] = 'Create XMPP domain'; -$wb['datalog_status_u_xmpp_domain'] = 'Update XMPP domain'; -$wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; -$wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; -$wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; -$wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; -$wb['datalog_changes_close_txt'] = 'Close'; +$wb['datalog_status_i_xmpp_domain'] = 'Crear dominio XMPP'; +$wb['datalog_status_u_xmpp_domain'] = 'Actualizar dominio XMPP'; +$wb['datalog_status_d_xmpp_domain'] = 'Borrar dominio XMPP'; +$wb['datalog_status_i_xmpp_user'] = 'Crear usuario XMPP'; +$wb['datalog_status_u_xmpp_user'] = 'Actualizar usuario XMPP'; +$wb['datalog_status_d_xmpp_user'] = 'Borrar usuario XMPP'; +$wb['datalog_changes_close_txt'] = 'Cerrar'; ?> -- GitLab From 320fbb7435a51404725d93c9dbc403ba01ab68ee Mon Sep 17 00:00:00 2001 From: Lorenzo Milesi Date: Wed, 6 Sep 2017 10:47:35 +0200 Subject: [PATCH 237/302] Fix typo Requiered in snippet config --- .gitignore | 1 + interface/web/admin/lib/lang/ar_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/bg_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/ca_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/cz_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/de_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/dk_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/el_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/en_directive_snippets.lng | 4 ++-- interface/web/admin/lib/lang/es_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/fi_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/fr_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/hr_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/hu_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/id_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/it_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/ja_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/nl_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/pl_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/pt_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/ro_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/se_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/sk_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/tr_directive_snippets.lng | 2 +- 24 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index e43b0f9889..1a3b8bd98e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +/nbproject/private/ \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ar_directive_snippets.lng b/interface/web/admin/lib/lang/ar_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/ar_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ar_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/bg_directive_snippets.lng b/interface/web/admin/lib/lang/bg_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/bg_directive_snippets.lng +++ b/interface/web/admin/lib/lang/bg_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/ca_directive_snippets.lng b/interface/web/admin/lib/lang/ca_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/ca_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ca_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/cz_directive_snippets.lng b/interface/web/admin/lib/lang/cz_directive_snippets.lng index 08c321037b..45cbb7f562 100644 --- a/interface/web/admin/lib/lang/cz_directive_snippets.lng +++ b/interface/web/admin/lib/lang/cz_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Proměnné'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/de_directive_snippets.lng b/interface/web/admin/lib/lang/de_directive_snippets.lng index 9e369f4b51..d6d13c6d76 100644 --- a/interface/web/admin/lib/lang/de_directive_snippets.lng +++ b/interface/web/admin/lib/lang/de_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Bitte geben Sie einen Namen für den Sch $wb['directive_snippets_name_error_unique'] = 'Es existiert schon ein Direktiven-Schnipsel mit diesem Namen.'; $wb['variables_txt'] = 'Variablen'; $wb['customer_viewable_txt'] = 'Sichtbar für Kunden'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/dk_directive_snippets.lng b/interface/web/admin/lib/lang/dk_directive_snippets.lng index 7b43dcd40b..cf7ce200de 100644 --- a/interface/web/admin/lib/lang/dk_directive_snippets.lng +++ b/interface/web/admin/lib/lang/dk_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Angiv et navn til uddrag.'; $wb['directive_snippets_name_error_unique'] = 'Der er allerede et direktiv uddrag med dette navn.'; $wb['variables_txt'] = 'Variabler'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/el_directive_snippets.lng b/interface/web/admin/lib/lang/el_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/el_directive_snippets.lng +++ b/interface/web/admin/lib/lang/el_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/en_directive_snippets.lng b/interface/web/admin/lib/lang/en_directive_snippets.lng index 8e8a63afe1..7cb406a0d0 100644 --- a/interface/web/admin/lib/lang/en_directive_snippets.lng +++ b/interface/web/admin/lib/lang/en_directive_snippets.lng @@ -8,5 +8,5 @@ $wb["directive_snippets_name_empty"] = 'Please specify a name for the snippet.'; $wb["directive_snippets_name_error_unique"] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; -?> \ No newline at end of file +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; +?> diff --git a/interface/web/admin/lib/lang/es_directive_snippets.lng b/interface/web/admin/lib/lang/es_directive_snippets.lng index 8e2a927079..f254c08aa0 100755 --- a/interface/web/admin/lib/lang/es_directive_snippets.lng +++ b/interface/web/admin/lib/lang/es_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['name_txt'] = 'Nombre del fragmento'; $wb['snippet_txt'] = 'Fragmento'; $wb['type_txt'] = 'Tipo'; $wb['variables_txt'] = 'Variables'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/fi_directive_snippets.lng b/interface/web/admin/lib/lang/fi_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/fi_directive_snippets.lng +++ b/interface/web/admin/lib/lang/fi_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/fr_directive_snippets.lng b/interface/web/admin/lib/lang/fr_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/fr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/fr_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/hr_directive_snippets.lng b/interface/web/admin/lib/lang/hr_directive_snippets.lng index 077896577d..11cc8bf189 100644 --- a/interface/web/admin/lib/lang/hr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/hr_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Molimo vas specificirajte naziv direktiv $wb['directive_snippets_name_error_unique'] = 'Već postoji direktiva sa tim imenom.'; $wb['variables_txt'] = 'Varijable'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/hu_directive_snippets.lng b/interface/web/admin/lib/lang/hu_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/hu_directive_snippets.lng +++ b/interface/web/admin/lib/lang/hu_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/id_directive_snippets.lng b/interface/web/admin/lib/lang/id_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/id_directive_snippets.lng +++ b/interface/web/admin/lib/lang/id_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/it_directive_snippets.lng b/interface/web/admin/lib/lang/it_directive_snippets.lng index 5598aacecc..49d91b2bbc 100644 --- a/interface/web/admin/lib/lang/it_directive_snippets.lng +++ b/interface/web/admin/lib/lang/it_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Indicare un nome per lo snippet.'; $wb['directive_snippets_name_error_unique'] = 'Esiste già una direttiva snippet con questo nome.'; $wb['variables_txt'] = 'Variabili'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/ja_directive_snippets.lng b/interface/web/admin/lib/lang/ja_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/ja_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ja_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/nl_directive_snippets.lng b/interface/web/admin/lib/lang/nl_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/nl_directive_snippets.lng +++ b/interface/web/admin/lib/lang/nl_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/pl_directive_snippets.lng b/interface/web/admin/lib/lang/pl_directive_snippets.lng index 4902bf3282..ba57dfb4c1 100644 --- a/interface/web/admin/lib/lang/pl_directive_snippets.lng +++ b/interface/web/admin/lib/lang/pl_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Wybierz nazwę dla zestawu dyrektyw'; $wb['directive_snippets_name_error_unique'] = 'Istnieje już zestaw dyrektyw o podanej nazwie'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/pt_directive_snippets.lng b/interface/web/admin/lib/lang/pt_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/pt_directive_snippets.lng +++ b/interface/web/admin/lib/lang/pt_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/ro_directive_snippets.lng b/interface/web/admin/lib/lang/ro_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/ro_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ro_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/se_directive_snippets.lng b/interface/web/admin/lib/lang/se_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/se_directive_snippets.lng +++ b/interface/web/admin/lib/lang/se_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/sk_directive_snippets.lng b/interface/web/admin/lib/lang/sk_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/sk_directive_snippets.lng +++ b/interface/web/admin/lib/lang/sk_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/tr_directive_snippets.lng b/interface/web/admin/lib/lang/tr_directive_snippets.lng index f503486528..de8893ddf4 100644 --- a/interface/web/admin/lib/lang/tr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/tr_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Parçacık adı boş olamaz.'; $wb['directive_snippets_name_error_unique'] = 'Aynı adlı bir yönerge parçacığı zaten var.'; $wb['variables_txt'] = 'Değişkenler'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> -- GitLab From ac431a326ac63080af78c9e4912b36654e5165f2 Mon Sep 17 00:00:00 2001 From: Lorenzo Milesi Date: Wed, 6 Sep 2017 10:47:35 +0200 Subject: [PATCH 238/302] Fix typo Requiered in snippet config --- .gitignore | 1 + interface/web/admin/lib/lang/ar_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/bg_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/ca_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/cz_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/de_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/dk_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/el_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/en_directive_snippets.lng | 4 ++-- interface/web/admin/lib/lang/es_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/fi_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/fr_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/hr_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/hu_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/id_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/it_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/ja_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/nl_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/pl_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/pt_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/ro_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/se_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/sk_directive_snippets.lng | 2 +- interface/web/admin/lib/lang/tr_directive_snippets.lng | 2 +- 24 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index e43b0f9889..1a3b8bd98e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +/nbproject/private/ \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ar_directive_snippets.lng b/interface/web/admin/lib/lang/ar_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/ar_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ar_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/bg_directive_snippets.lng b/interface/web/admin/lib/lang/bg_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/bg_directive_snippets.lng +++ b/interface/web/admin/lib/lang/bg_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/ca_directive_snippets.lng b/interface/web/admin/lib/lang/ca_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/ca_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ca_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/cz_directive_snippets.lng b/interface/web/admin/lib/lang/cz_directive_snippets.lng index 08c321037b..45cbb7f562 100644 --- a/interface/web/admin/lib/lang/cz_directive_snippets.lng +++ b/interface/web/admin/lib/lang/cz_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Proměnné'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/de_directive_snippets.lng b/interface/web/admin/lib/lang/de_directive_snippets.lng index 9e369f4b51..d6d13c6d76 100644 --- a/interface/web/admin/lib/lang/de_directive_snippets.lng +++ b/interface/web/admin/lib/lang/de_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Bitte geben Sie einen Namen für den Sch $wb['directive_snippets_name_error_unique'] = 'Es existiert schon ein Direktiven-Schnipsel mit diesem Namen.'; $wb['variables_txt'] = 'Variablen'; $wb['customer_viewable_txt'] = 'Sichtbar für Kunden'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/dk_directive_snippets.lng b/interface/web/admin/lib/lang/dk_directive_snippets.lng index 7b43dcd40b..cf7ce200de 100644 --- a/interface/web/admin/lib/lang/dk_directive_snippets.lng +++ b/interface/web/admin/lib/lang/dk_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Angiv et navn til uddrag.'; $wb['directive_snippets_name_error_unique'] = 'Der er allerede et direktiv uddrag med dette navn.'; $wb['variables_txt'] = 'Variabler'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/el_directive_snippets.lng b/interface/web/admin/lib/lang/el_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/el_directive_snippets.lng +++ b/interface/web/admin/lib/lang/el_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/en_directive_snippets.lng b/interface/web/admin/lib/lang/en_directive_snippets.lng index 8e8a63afe1..7cb406a0d0 100644 --- a/interface/web/admin/lib/lang/en_directive_snippets.lng +++ b/interface/web/admin/lib/lang/en_directive_snippets.lng @@ -8,5 +8,5 @@ $wb["directive_snippets_name_empty"] = 'Please specify a name for the snippet.'; $wb["directive_snippets_name_error_unique"] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; -?> \ No newline at end of file +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; +?> diff --git a/interface/web/admin/lib/lang/es_directive_snippets.lng b/interface/web/admin/lib/lang/es_directive_snippets.lng index 8e2a927079..f254c08aa0 100755 --- a/interface/web/admin/lib/lang/es_directive_snippets.lng +++ b/interface/web/admin/lib/lang/es_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['name_txt'] = 'Nombre del fragmento'; $wb['snippet_txt'] = 'Fragmento'; $wb['type_txt'] = 'Tipo'; $wb['variables_txt'] = 'Variables'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/fi_directive_snippets.lng b/interface/web/admin/lib/lang/fi_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/fi_directive_snippets.lng +++ b/interface/web/admin/lib/lang/fi_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/fr_directive_snippets.lng b/interface/web/admin/lib/lang/fr_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/fr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/fr_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/hr_directive_snippets.lng b/interface/web/admin/lib/lang/hr_directive_snippets.lng index 077896577d..11cc8bf189 100644 --- a/interface/web/admin/lib/lang/hr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/hr_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Molimo vas specificirajte naziv direktiv $wb['directive_snippets_name_error_unique'] = 'Već postoji direktiva sa tim imenom.'; $wb['variables_txt'] = 'Varijable'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/hu_directive_snippets.lng b/interface/web/admin/lib/lang/hu_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/hu_directive_snippets.lng +++ b/interface/web/admin/lib/lang/hu_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/id_directive_snippets.lng b/interface/web/admin/lib/lang/id_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/id_directive_snippets.lng +++ b/interface/web/admin/lib/lang/id_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/it_directive_snippets.lng b/interface/web/admin/lib/lang/it_directive_snippets.lng index 5598aacecc..49d91b2bbc 100644 --- a/interface/web/admin/lib/lang/it_directive_snippets.lng +++ b/interface/web/admin/lib/lang/it_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Indicare un nome per lo snippet.'; $wb['directive_snippets_name_error_unique'] = 'Esiste già una direttiva snippet con questo nome.'; $wb['variables_txt'] = 'Variabili'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/ja_directive_snippets.lng b/interface/web/admin/lib/lang/ja_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/ja_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ja_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/nl_directive_snippets.lng b/interface/web/admin/lib/lang/nl_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/nl_directive_snippets.lng +++ b/interface/web/admin/lib/lang/nl_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/pl_directive_snippets.lng b/interface/web/admin/lib/lang/pl_directive_snippets.lng index 4902bf3282..ba57dfb4c1 100644 --- a/interface/web/admin/lib/lang/pl_directive_snippets.lng +++ b/interface/web/admin/lib/lang/pl_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Wybierz nazwę dla zestawu dyrektyw'; $wb['directive_snippets_name_error_unique'] = 'Istnieje już zestaw dyrektyw o podanej nazwie'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/pt_directive_snippets.lng b/interface/web/admin/lib/lang/pt_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/pt_directive_snippets.lng +++ b/interface/web/admin/lib/lang/pt_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/ro_directive_snippets.lng b/interface/web/admin/lib/lang/ro_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/ro_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ro_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/se_directive_snippets.lng b/interface/web/admin/lib/lang/se_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/se_directive_snippets.lng +++ b/interface/web/admin/lib/lang/se_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/sk_directive_snippets.lng b/interface/web/admin/lib/lang/sk_directive_snippets.lng index 0616afad8b..5371b632a9 100644 --- a/interface/web/admin/lib/lang/sk_directive_snippets.lng +++ b/interface/web/admin/lib/lang/sk_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.'; $wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> diff --git a/interface/web/admin/lib/lang/tr_directive_snippets.lng b/interface/web/admin/lib/lang/tr_directive_snippets.lng index f503486528..de8893ddf4 100644 --- a/interface/web/admin/lib/lang/tr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/tr_directive_snippets.lng @@ -8,5 +8,5 @@ $wb['directive_snippets_name_empty'] = 'Parçacık adı boş olamaz.'; $wb['directive_snippets_name_error_unique'] = 'Aynı adlı bir yönerge parçacığı zaten var.'; $wb['variables_txt'] = 'Değişkenler'; $wb['customer_viewable_txt'] = 'Customer viewable'; -$wb['required_php_snippets_txt'] = 'Requiered PHP Snippet'; +$wb['required_php_snippets_txt'] = 'Required PHP Snippet'; ?> -- GitLab From aee2da207656c28925a08e3e210e6f2221605401 Mon Sep 17 00:00:00 2001 From: ispcomm Date: Fri, 8 Sep 2017 17:53:11 +0200 Subject: [PATCH 239/302] till proposed update for _primary_id enforcement (w.i.p.) --- interface/lib/classes/remoting_lib.inc.php | 4 +++- interface/lib/classes/tform_base.inc.php | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index a3c744fa83..98fd5af9cd 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -199,7 +199,9 @@ class remoting_lib extends tform_base { function getSQL($record, $action = 'INSERT', $primary_id = 0, $sql_ext_where = '', $dummy = '') { global $app; - + + $this->primary_id_override = true; + if(!is_array($this->formDef)) $app->error("Form definition not found."); $this->dataRecord = $record; diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 1c96afb728..2e0fa2dad1 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -104,6 +104,7 @@ class tform_base { var $module; var $primary_id; var $diffrec = array(); + var $primary_id_override = false; /** * Loading of the table definition @@ -1271,6 +1272,11 @@ class tform_base { if($api == true) $fields = &$this->formDef['fields']; else $fields = &$this->formDef['tabs'][$tab]['fields']; + if($this->primary_id_override && isset($record['_primary_id'])) { + $sql_insert_key .= '`'.$this->formDef["db_table_idx"].'`, '; + $sql_insert_val .= intval($record['_primary_id']).", "; + } + // go trough all fields of the tab if(is_array($record)) { foreach($fields as $key => $field) { -- GitLab From 6dfc6d26e07010b575627b073c836b6d4ebce7b9 Mon Sep 17 00:00:00 2001 From: ispcomm Date: Sat, 9 Sep 2017 13:08:25 +0200 Subject: [PATCH 240/302] _primary_id enforcing added to $params --- interface/lib/classes/remoting.inc.php | 5 ++++- interface/lib/classes/remoting_lib.inc.php | 7 ++++++- interface/lib/classes/tform_base.inc.php | 17 +++++++++-------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index 24577b3b26..85eabbc480 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -333,7 +333,10 @@ class remoting { return false; } - $insert_id = $app->db->insertID(); + if ( isset($params['_primary_id'] )) + $insert_id = $params['_primary_id']; + else + $insert_id = $app->db->insertID(); // set a few values for compatibility with tform actions, mostly used by plugins $this->id = $insert_id; diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index 98fd5af9cd..6e0146d25f 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -200,7 +200,12 @@ class remoting_lib extends tform_base { global $app; - $this->primary_id_override = true; + // early usage. make sure _primary_id is sanitized if present. + if ( isset($record['_primary_id']) && is_numeric($record['_primary_id'])) { + $_primary_id = intval($record['_primary_id']); + if ($_primary_id > 0) + $this->primary_id_override = intval($record['_primary_id']); + } if(!is_array($this->formDef)) $app->error("Form definition not found."); $this->dataRecord = $record; diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 2e0fa2dad1..a7f4746662 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -104,7 +104,7 @@ class tform_base { var $module; var $primary_id; var $diffrec = array(); - var $primary_id_override = false; + var $primary_id_override = 0; /** * Loading of the table definition @@ -1263,20 +1263,21 @@ class tform_base { $this->action = $action; $this->primary_id = $primary_id; - - $record = $this->encode($record, $tab, true); $sql_insert_key = ''; $sql_insert_val = ''; $sql_update = ''; + $record = $this->encode($record, $tab, true); + + if(($this->primary_id_override > 0)) { + $sql_insert_key .= '`'.$this->formDef["db_table_idx"].'`, '; + $sql_insert_val .= $this->primary_id_override.", "; + $record['_primary_id'] = $this->primary_id_override; + } + if($api == true) $fields = &$this->formDef['fields']; else $fields = &$this->formDef['tabs'][$tab]['fields']; - if($this->primary_id_override && isset($record['_primary_id'])) { - $sql_insert_key .= '`'.$this->formDef["db_table_idx"].'`, '; - $sql_insert_val .= intval($record['_primary_id']).", "; - } - // go trough all fields of the tab if(is_array($record)) { foreach($fields as $key => $field) { -- GitLab From 8da17b13a5850916aab609501d6f3dc4c71e2aa3 Mon Sep 17 00:00:00 2001 From: ispcomm Date: Mon, 11 Sep 2017 14:23:43 +0200 Subject: [PATCH 241/302] small opt.on _primary_id --- interface/lib/classes/remoting_lib.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index 6e0146d25f..0f313de6bd 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -204,7 +204,7 @@ class remoting_lib extends tform_base { if ( isset($record['_primary_id']) && is_numeric($record['_primary_id'])) { $_primary_id = intval($record['_primary_id']); if ($_primary_id > 0) - $this->primary_id_override = intval($record['_primary_id']); + $this->primary_id_override = $_primary_id; } if(!is_array($this->formDef)) $app->error("Form definition not found."); -- GitLab From 7fb8191ea63646fce220cd5179b97c315e498fc2 Mon Sep 17 00:00:00 2001 From: ispcomm Date: Mon, 11 Sep 2017 14:28:33 +0200 Subject: [PATCH 242/302] tab space adjusted --- interface/lib/classes/tform_base.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index a7f4746662..2c76fc61a4 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -1270,8 +1270,8 @@ class tform_base { $record = $this->encode($record, $tab, true); if(($this->primary_id_override > 0)) { - $sql_insert_key .= '`'.$this->formDef["db_table_idx"].'`, '; - $sql_insert_val .= $this->primary_id_override.", "; + $sql_insert_key .= '`'.$this->formDef["db_table_idx"].'`, '; + $sql_insert_val .= $this->primary_id_override.", "; $record['_primary_id'] = $this->primary_id_override; } -- GitLab From c83713098f5f3ba61f9f517e992578e0a4b5dd9f Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Wed, 13 Sep 2017 10:00:35 +0200 Subject: [PATCH 243/302] CAA-List Update --- .../sql/incremental/upd_dev_collection.sql | 57 +++++++++++++++++-- install/sql/ispconfig3.sql | 49 ++++++++++++++-- 2 files changed, 97 insertions(+), 9 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index f3cc5ae23f..44042f2381 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -42,18 +42,65 @@ CREATE TABLE IF NOT EXISTS `dns_ssl_ca` ( `ca_wildcard` enum('Y','N') NOT NULL DEFAULT 'N', `ca_iodef` text NOT NULL, `ca_critical` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + UNIQUE KEY (`ca_issue`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES +ALTER TABLE `dns_ssl_ca` ADD UNIQUE(`ca_issue`); + +UPDATE `dns_ssl_ca` SET `ca_issue` = 'comodo.com' WHERE `ca_issue` = 'comodoca.com'; +UPDATE `dns_ssl_ca` SET `ca_issue` = 'geotrust.com' WHERE `ca_issue` = 'symantec.com'; +UPDATE `dns_ssl_ca` SET `ca_issue` = 'thawte.com' WHERE `ca_issue` = 'symantec.com'; + +INSERT IGNORE INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'AC Camerfirma', 'camerfirma.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'ACCV', 'accv.es', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Actalis', 'actalis.it', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Amazon', 'amazon.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Asseco', 'certum.pl', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Buypass', 'buypass.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CA Disig', 'disig.sk', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CATCert', 'aoc.cat', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Certinomis', 'www.certinomis.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Certizen', 'hongkongpost.gov.hk', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'certSIGN', 'certsign.ro', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CFCA', 'cfca.com.cn', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Chunghwa Telecom', 'cht.com.tw', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Comodo', 'comodoca.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'D-TRUST', 'd-trust.net', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'DigiCert', 'digicert.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'DocuSign', 'docusign.fr', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'e-tugra', 'e-tugra.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'EDICOM', 'edicomgroup.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Entrust', 'entrust.net', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GeoTrust (Symantec)', 'geotrust.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Firmaprofesional', 'firmaprofesional.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'FNMT', 'fnmt.es', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GeoTrust (Symantec)', 'symantec.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GlobalSign', 'globalsign.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GoDaddy', 'godaddy.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Google Trust Services', 'pki.goog', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GRCA', 'gca.nat.gov.tw', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'HARICA', 'harica.gr', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'IdenTrust', 'identrust.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Izenpe', 'izenpe.com', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Let''s Encrypt', 'letsencrypt.org', 'N', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Kamu SM', 'kamusm.gov.tr', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Let''s Encrypt', 'letsencrypt.org', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Microsec e-Szigno', 'e-szigno.hu', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'NetLock', 'netlock.hu', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'PKIoverheid', 'www.pkioverheid.nl', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'PROCERT', 'procert.net.ve', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'QuoVadis', 'quovadisglobal.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'SECOM', 'secomtrust.net', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Sertifitseerimiskeskuse', 'sk.ee', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'StartCom', 'startcomca.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'SwissSign', 'swisssign.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Symantec', 'symantec.com', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Thawte (Symantec)', 'thawte.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'T-Systems', 'telesec.de', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Telia', 'telia.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Thawte (Symantec)', 'symantec.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Trustwave', 'trustwave.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Web.com', 'web.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WISeKey', 'wisekey.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WoSign', 'wosign.com', 'Y', '', 0); ALTER TABLE `dns_rr` CHANGE `type` `type` ENUM('A','AAAA','ALIAS','CAA','CNAME','DS','HINFO','LOC','MX','NAPTR','NS','PTR','RP','SRV','TXT','TLSA','DNSKEY') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 94961035cc..c43003a581 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -519,18 +519,59 @@ CREATE TABLE IF NOT EXISTS `dns_ssl_ca` ( `ca_wildcard` enum('Y','N') NOT NULL DEFAULT 'N', `ca_iodef` text NOT NULL, `ca_critical` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + UNIQUE KEY (`ca_issue`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'AC Camerfirma', 'camerfirma.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'ACCV', 'accv.es', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Actalis', 'actalis.it', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Amazon', 'amazon.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Asseco', 'certum.pl', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Buypass', 'buypass.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CA Disig', 'disig.sk', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CATCert', 'aoc.cat', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Certinomis', 'www.certinomis.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Certizen', 'hongkongpost.gov.hk', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'certSIGN', 'certsign.ro', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CFCA', 'cfca.com.cn', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Chunghwa Telecom', 'cht.com.tw', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Comodo', 'comodoca.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'D-TRUST', 'd-trust.net', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'DigiCert', 'digicert.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'DocuSign', 'docusign.fr', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'e-tugra', 'e-tugra.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'EDICOM', 'edicomgroup.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Entrust', 'entrust.net', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GeoTrust (Symantec)', 'geotrust.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Firmaprofesional', 'firmaprofesional.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'FNMT', 'fnmt.es', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GeoTrust (Symantec)', 'symantec.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GlobalSign', 'globalsign.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GoDaddy', 'godaddy.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Google Trust Services', 'pki.goog', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GRCA', 'gca.nat.gov.tw', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'HARICA', 'harica.gr', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'IdenTrust', 'identrust.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Izenpe', 'izenpe.com', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Let''s Encrypt', 'letsencrypt.org', 'N', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Kamu SM', 'kamusm.gov.tr', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Let''s Encrypt', 'letsencrypt.org', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Microsec e-Szigno', 'e-szigno.hu', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'NetLock', 'netlock.hu', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'PKIoverheid', 'www.pkioverheid.nl', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'PROCERT', 'procert.net.ve', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'QuoVadis', 'quovadisglobal.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'SECOM', 'secomtrust.net', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Sertifitseerimiskeskuse', 'sk.ee', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'StartCom', 'startcomca.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'SwissSign', 'swisssign.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Symantec', 'symantec.com', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Thawte (Symantec)', 'thawte.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'T-Systems', 'telesec.de', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Telia', 'telia.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Thawte (Symantec)', 'symantec.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Trustwave', 'trustwave.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Web.com', 'web.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WISeKey', 'wisekey.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WoSign', 'wosign.com', 'Y', '', 0); -- GitLab From c9b92f63f652c644fee94944d35de9a24a87730a Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Wed, 13 Sep 2017 10:03:03 +0200 Subject: [PATCH 244/302] update last commit --- install/sql/ispconfig3.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index c43003a581..fcd7a4d535 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -537,7 +537,7 @@ INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `s (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'certSIGN', 'certsign.ro', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CFCA', 'cfca.com.cn', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Chunghwa Telecom', 'cht.com.tw', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Comodo', 'comodoca.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Comodo', 'comodo.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'D-TRUST', 'd-trust.net', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'DigiCert', 'digicert.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'DocuSign', 'docusign.fr', 'Y', '', 0), -- GitLab From 92d994f97473323522b335fc44c90f534c8eef30 Mon Sep 17 00:00:00 2001 From: Rakoto-Andrianirina Tahina Date: Fri, 15 Sep 2017 13:41:16 +0200 Subject: [PATCH 245/302] Update import_ispconfig.php. Second self signed SSL certs is need in next connexion. --- interface/web/tools/import_ispconfig.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/interface/web/tools/import_ispconfig.php b/interface/web/tools/import_ispconfig.php index c43b15b7eb..728c279c01 100644 --- a/interface/web/tools/import_ispconfig.php +++ b/interface/web/tools/import_ispconfig.php @@ -109,10 +109,21 @@ if(isset($_POST['connected'])) { try { + //* Second connections to self signed SSL certs + $context = stream_context_create( + array( + 'ssl' => array ( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ) + ) + ); $client = new SoapClient(null, array('location' => $_POST['remote_server'], 'uri' => $_POST['remote_server'].'/index.php', 'trace' => 1, - 'exceptions' => 1)); + 'exceptions' => 1, + 'stream_context' => $context)); if(!isset($remote_session_id)) $remote_session_id = $_POST['remote_session_id']; -- GitLab From da1a0f80cfb044dd8c5f0a4bfd7d7785547ce0a1 Mon Sep 17 00:00:00 2001 From: Denny Bortfeldt Date: Wed, 20 Sep 2017 07:25:36 +0200 Subject: [PATCH 246/302] Update mail_plugin.inc.php. Change check order for welcome-email template. First it should use specific welcome messages for the domain (html before text) and than language specific templates. Otherwise it would use a german html language file before a domain specific text file if html file does not exist. --- server/plugins-available/mail_plugin.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index 8275696620..17f48efe26 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -213,11 +213,11 @@ class mail_plugin { if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html'); $html = true; + } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) { + $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt'); } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html'); $html = true; - } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) { - $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt'); } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt'); } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt')) { -- GitLab From b29464199542d702a35d75c905495bb649c5d112 Mon Sep 17 00:00:00 2001 From: Paco Date: Thu, 21 Sep 2017 16:42:26 +0200 Subject: [PATCH 247/302] Full translate. --- interface/web/dns/lib/lang/bg_dns_a.lng | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/web/dns/lib/lang/bg_dns_a.lng b/interface/web/dns/lib/lang/bg_dns_a.lng index e397d9774e..ca0b8e4717 100644 --- a/interface/web/dns/lib/lang/bg_dns_a.lng +++ b/interface/web/dns/lib/lang/bg_dns_a.lng @@ -2,16 +2,16 @@ $wb['server_id_txt'] = 'Сървър'; $wb['zone_txt'] = 'Зона'; $wb['name_txt'] = 'Име на хоста'; -$wb['type_txt'] = 'тип'; -$wb['data_txt'] = 'IP-адрес'; +$wb['type_txt'] = 'Tип'; +$wb['data_txt'] = 'IP адрес'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Активен'; $wb['limit_dns_record_txt'] = 'Максималният брой за DNS записи в твоят профил е достигнат.'; $wb['no_zone_perm'] = 'Нямате права да добавяте записи за DNS в тази зона.'; $wb['name_error_empty'] = 'Полето за хост име е празно.'; $wb['name_error_regex'] = 'Избраното име на хост е в грешен формат.'; -$wb['data_error_empty'] = 'Полето за IP-адреса е празно'; -$wb['ip_error_wrong'] = 'Формата на IP-адреса е грешен'; -$wb['data_error_duplicate'] = 'Дублиран A-Запис'; -$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['data_error_empty'] = 'Полето за IP адреса е празно'; +$wb['ip_error_wrong'] = 'Формата на IP адреса е грешен'; +$wb['data_error_duplicate'] = 'Дублиран A Запис'; +$wb['ttl_range_error'] = 'Минималния TTL е 60 секунди.'; ?> -- GitLab From 2537af092dfb2577345bf8b134984e937cfce3a0 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 26 Sep 2017 13:34:01 +0800 Subject: [PATCH 248/302] webdav fixed and checked in productive server --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index a1d3b2a9e0..2d679fbb8e 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2744,7 +2744,7 @@ class apache2_plugin { $output .= "Dav On\n"; $output .= "BrowserMatch MSIE AuthDigestEnableQueryStringHack=On\n"; $output .= "AuthType Digest\n"; - $output .= "AuthName \"Restricted Area\"\n"; + $output .= 'AuthName "'.(empty($fn)?'/':$fn).'"\n'; $output .= "AuthUserFile $webdavRoot/$file\n"; $output .= "Require valid-user\n"; $output .= "Options +Indexes\n"; -- GitLab From 5a3b3d043e0d9f6754155ed85439aac9674417c7 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Tue, 26 Sep 2017 13:46:56 +0800 Subject: [PATCH 249/302] end of line corrected --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 2d679fbb8e..d6c9a56ff6 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2744,7 +2744,7 @@ class apache2_plugin { $output .= "Dav On\n"; $output .= "BrowserMatch MSIE AuthDigestEnableQueryStringHack=On\n"; $output .= "AuthType Digest\n"; - $output .= 'AuthName "'.(empty($fn)?'/':$fn).'"\n'; + $output .= 'AuthName "'.(empty($fn)?'/':$fn)."\"\n"; $output .= "AuthUserFile $webdavRoot/$file\n"; $output .= "Require valid-user\n"; $output .= "Options +Indexes\n"; -- GitLab From 693e4b935b5be2df8a06f92797614f8e129efe5b Mon Sep 17 00:00:00 2001 From: Anton Avramov Date: Wed, 4 Oct 2017 18:05:20 +0300 Subject: [PATCH 250/302] Fix #4808 Load the existing keys without new line, so array_search can find the old ones. Unset a key from existing_keys only if a match is false and avoid false being treated as 0 --- server/plugins-available/shelluser_base_plugin.inc.php | 8 +++++--- server/plugins-available/shelluser_jailkit_plugin.inc.php | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index d3376f10ca..74c6fa364f 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -461,7 +461,7 @@ class shelluser_base_plugin { if(is_file('/root/.ssh/authorized_keys')) $app->system->file_put_contents($sshkeys, $app->system->file_get_contents('/root/.ssh/authorized_keys')); // Remove duplicate keys - $existing_keys = @file($sshkeys); + $existing_keys = @file($sshkeys, FILE_IGNORE_NEW_LINES); $new_keys = explode("\n", $userkey); $final_keys_arr = @array_merge($existing_keys, $new_keys); $new_final_keys_arr = array(); @@ -479,7 +479,7 @@ class shelluser_base_plugin { } //* Get the keys - $existing_keys = file($sshkeys); + $existing_keys = file($sshkeys, FILE_IGNORE_NEW_LINES); $new_keys = explode("\n", $sshrsa); $old_keys = explode("\n", $this->data['old']['ssh_rsa']); @@ -487,7 +487,9 @@ class shelluser_base_plugin { if(is_array($old_keys)) { foreach($old_keys as $key => $val) { $k = array_search(trim($val), $existing_keys); - unset($existing_keys[$k]); + if ($k !== false) { + unset($existing_keys[$k]); + } } } diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 291c771e6c..69a041c037 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -480,7 +480,7 @@ class shelluser_jailkit_plugin { if(is_file('/root/.ssh/authorized_keys')) $app->system->file_put_contents($sshkeys, $app->system->file_get_contents('/root/.ssh/authorized_keys')); // Remove duplicate keys - $existing_keys = @file($sshkeys); + $existing_keys = @file($sshkeys, FILE_IGNORE_NEW_LINES); $new_keys = explode("\n", $userkey); $final_keys_arr = @array_merge($existing_keys, $new_keys); $new_final_keys_arr = array(); @@ -497,7 +497,7 @@ class shelluser_jailkit_plugin { $this->app->log("ssh-rsa authorisation keyfile created in ".$sshkeys, LOGLEVEL_DEBUG); } //* Get the keys - $existing_keys = file($sshkeys); + $existing_keys = file($sshkeys, FILE_IGNORE_NEW_LINES); $new_keys = explode("\n", $sshrsa); $old_keys = explode("\n", $this->data['old']['ssh_rsa']); @@ -505,7 +505,9 @@ class shelluser_jailkit_plugin { if(is_array($old_keys)) { foreach($old_keys as $key => $val) { $k = array_search(trim($val), $existing_keys); - unset($existing_keys[$k]); + if ($k !== false) { + unset($existing_keys[$k]); + } } } -- GitLab From b5538a812e53de6f76208944715151ed09dde03c Mon Sep 17 00:00:00 2001 From: AndyPL Date: Thu, 5 Oct 2017 14:30:32 +0200 Subject: [PATCH 251/302] Update pl.lng --- interface/web/login/lib/lang/pl.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/login/lib/lang/pl.lng b/interface/web/login/lib/lang/pl.lng index da43327d51..ce9c489ce4 100644 --- a/interface/web/login/lib/lang/pl.lng +++ b/interface/web/login/lib/lang/pl.lng @@ -14,7 +14,7 @@ $wb['error_user_too_many_logins'] = 'Zbyt dużo niepoprawnych logowań. Prosimy $wb['username_txt'] = 'Nazwa użytkownika'; $wb['password_txt'] = 'Hasło'; $wb['login_button_txt'] = 'Zaloguj'; -$wb['login_txt'] = 'Login'; +$wb['login_txt'] = 'Zaloguj'; $wb['pw_lost_txt'] = 'Zapomniałem hasła'; $wb['pw_reset_txt'] = 'Reset hasła'; $wb['pw_button_txt'] = 'Prześlij hasło ponownie'; -- GitLab From 70d106c1ad226d714ee3de0eed8e0059633d818f Mon Sep 17 00:00:00 2001 From: AndyPL Date: Thu, 5 Oct 2017 14:45:17 +0200 Subject: [PATCH 252/302] Update pl.lng --- interface/web/monitor/lib/lang/pl.lng | 29 ++++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/interface/web/monitor/lib/lang/pl.lng b/interface/web/monitor/lib/lang/pl.lng index 4ce642fbd8..647e7b8be0 100644 --- a/interface/web/monitor/lib/lang/pl.lng +++ b/interface/web/monitor/lib/lang/pl.lng @@ -6,6 +6,7 @@ $wb['System load 5 minutes'] = 'Obciążenie systemu w ciągu ostatnich 5 minut' $wb['System load 15 minutes'] = 'Obciążenie systemu w ciągu ostatnich 15 minut'; $wb['Server Load'] = 'Serwer włączony'; $wb['Disk usage'] = 'Użycie dysku'; +$wb['Show MySQL Database size'] = 'Pokaż rozmiar baz danych MySQL'; $wb['Memory usage'] = 'Użycie pamięci'; $wb['no_data_serverload_txt'] = 'Żadne dane o serwerze nie zostały załadowane w tym momencie. Prosze spróbować ponownie później.'; $wb['no_data_memusage_txt'] = 'Żadne dane o użyciu pamięci nie zostały załadowane w tym momencie. Prosze spróbować ponownie później.'; @@ -143,21 +144,21 @@ $wb['monitor_serverstate_beancountererror_txt'] = 'Jest za dużo problemów w be $wb['monitor_title_beancounter_txt'] = 'OpenVz VE BeanCounter'; $wb['monitor_beancounter_nosupport_txt'] = 'Ten serwer nie jest serwerem OpenVz VE i nie posiada informacji o beancounterach'; $wb['monitor_title_iptables_txt'] = 'Reguły IPTables'; -$wb['Show fail2ban-Log'] = 'Pokaż log fail2ban'; +$wb['Show fail2ban-Log'] = 'Pokaż Log fail2ban'; $wb['Show IPTables'] = 'Pokaż reguły IPTables'; -$wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter'; -$wb['Show Monit'] = 'Show Monit'; -$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.'; -$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.'; -$wb['Show Munin'] = 'Show Munin'; -$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.'; -$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.'; -$wb['no_data_database_size_txt'] = 'No data about the database usage available at the moment. Please check again later.'; -$wb['monitor_database_name_txt'] = 'Database'; -$wb['monitor_database_size_txt'] = 'Size'; -$wb['monitor_database_client_txt'] = 'Client'; -$wb['monitor_database_domain_txt'] = 'Domain'; -$wb['Show MongoDB-Log'] = 'Show MongoDB-Log'; +$wb['Show OpenVz VE BeanCounter'] = 'Pokaż OpenVz VE BeanCounter'; +$wb['Show Monit'] = 'Pokaż Monit'; +$wb['no_monit_url_defined_txt'] = 'Nie zdefiniowano adresu URL Monit.'; +$wb['no_permissions_to_view_monit_txt'] = 'Nie masz dostępu do Monit.'; +$wb['Show Munin'] = 'Pokaż Munin'; +$wb['no_munin_url_defined_txt'] = 'Nie zdefiniowano adresu URL Munin.'; +$wb['no_permissions_to_view_munin_txt'] = 'Nie masz dostępu do Munina.'; +$wb['no_data_database_size_txt'] = 'Brak danych na temat wykorzystania bazy danych w danym momencie. Sprawdź później ponownie.'; +$wb['monitor_database_name_txt'] = 'Baza danych'; +$wb['monitor_database_size_txt'] = 'Wielkość'; +$wb['monitor_database_client_txt'] = 'Klient'; +$wb['monitor_database_domain_txt'] = 'Domena'; +$wb['Show MongoDB-Log'] = 'Pokaż Log MongoDB'; $wb['monitor_services_mongodb_txt'] = 'MongoDB-Server:'; $wb['monitor_title_mongodb_txt'] = 'MongoDB Log'; ?> -- GitLab From 4fa7bd63b3ccce8009caf67a739638513353008e Mon Sep 17 00:00:00 2001 From: AndyPL Date: Thu, 5 Oct 2017 14:50:54 +0200 Subject: [PATCH 253/302] Update pl.lng --- interface/web/client/lib/lang/pl.lng | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/web/client/lib/lang/pl.lng b/interface/web/client/lib/lang/pl.lng index ca1563e8b8..da5250f9b1 100644 --- a/interface/web/client/lib/lang/pl.lng +++ b/interface/web/client/lib/lang/pl.lng @@ -5,8 +5,8 @@ $wb['Limits'] = 'Limity'; $wb['Add Client'] = 'Dodaj klienta'; $wb['Edit Client'] = 'Edytuj klienta'; $wb['Clients'] = 'Klienci'; -$wb['Templates'] = 'Templates'; -$wb['Limit-Templates'] = 'Limit-Templates'; +$wb['Templates'] = 'Szablony'; +$wb['Limit-Templates'] = 'Szablony limitów'; $wb['Add Reseller'] = 'Dodaj Resellera'; $wb['Edit Reseller'] = 'Edytuj Resellera'; $wb['Resellers'] = 'Resellerzy'; @@ -23,7 +23,7 @@ $wb['error_domain_in mailuse'] = 'Ta domena nie może zostać usunięta poniewa $wb['error_domain_in webuse'] = 'Ta domena nie może zostać usunięta ponieważ jest używana jako domena dla strony www.'; $wb['error_client_can_not_add_domain'] = 'Nie możesz dodać nowej domeny'; $wb['error_client_group_id_empty'] = 'Musisz wybrać klienta
'; -$wb['error_domain_in dnsuse'] = 'This domain cannot be deleted, because it is in use as dns zone'; -$wb['error_domain_in dnsslaveuse'] = 'This domain cannot be deleted, because it is in use as secondary dns zone'; -$wb['Email-Templates'] = 'Email-Templates'; +$wb['error_domain_in dnsuse'] = 'Nie można usunąć tej domeny, ponieważ jest ona używana jako strefa dns'; +$wb['error_domain_in dnsslaveuse'] = 'Ta domena nie może zostać usunięta, ponieważ jest ona używana jako druga strefa dns'; +$wb['Email-Templates'] = 'Szablony email'; ?> -- GitLab From ccc2214f53ea88b6008ba7c8d4763eadf8bc55fd Mon Sep 17 00:00:00 2001 From: AndyPL Date: Thu, 5 Oct 2017 14:57:38 +0200 Subject: [PATCH 254/302] Update pl_ftp_sites_stats_list.lng --- .../web/sites/lib/lang/pl_ftp_sites_stats_list.lng | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/interface/web/sites/lib/lang/pl_ftp_sites_stats_list.lng b/interface/web/sites/lib/lang/pl_ftp_sites_stats_list.lng index e44025a715..74ee2d2187 100644 --- a/interface/web/sites/lib/lang/pl_ftp_sites_stats_list.lng +++ b/interface/web/sites/lib/lang/pl_ftp_sites_stats_list.lng @@ -1,10 +1,10 @@ -- GitLab From a2ed9b580dcfd5f0dc85c49fd006c3000827db59 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sun, 8 Oct 2017 01:34:00 +0800 Subject: [PATCH 255/302] reconfigure pure-ftpd --- install/lib/installer_base.lib.php | 62 +++++++++++++++--------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 492b092565..104c343f24 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1560,38 +1560,36 @@ class installer_base { //if(is_file($conf['init_scripts'].'/'.'openbsd-inetd')) exec($conf['init_scripts'].'/'.'openbsd-inetd restart'); } - if(!$this->is_update) { - //* backup old settings - exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; printf '\n'; done 2>&1 >$config_dir/conf/.backup~"); - //* clean common unused settings - exec("rm $config_dir/conf/MinUID $config_dir/conf/PAMAuthentication $config_dir/conf/PureDB $config_dir/conf/UnixAuthentication 2> /dev/null"); - //* required for ftp traffic stats - file_put_contents("$config_dir/conf/AltLog","clf:/var/log/pure-ftpd/transfer.log"); - //* improves client compatibility - file_put_contents("$config_dir/conf/BrokenClientsCompatibility","yes"); - //* needed for ispconfig implementation - file_put_contents("$config_dir/conf/ChrootEveryone","yes"); - //* improves client compatibility - file_put_contents("$config_dir/conf/DisplayDotFiles","yes"); - //* improves performance - file_put_contents("$config_dir/conf/DontResolve","yes"); - //* complies with RFC2640 - file_put_contents("$config_dir/conf/FSCharset","UTF-8"); - //* provides welcome message - file_put_contents("$config_dir/conf/FortunesFile","$config_dir/welcome.msg"); - //* increases the clients limit from 50 (default) to 1024 - file_put_contents("$config_dir/conf/MaxClientsNumber","1024"); - //* prevents DoS attack from the same IP address - file_put_contents("$config_dir/conf/MaxClientsPerIP","64"); - //* needed for ispconfig implementation - file_put_contents("$config_dir/conf/MySQLConfigFile","$config_dir/db/mysql.conf"); - //* recommended for ispconfig implementation - file_put_contents("$config_dir/conf/NoAnonymous","yes"); - //* grade A encryption - file_put_contents("$config_dir/conf/TLSCipherSuite","ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!RC4"); - //* hides implementation details - file_put_contents("$config_dir/welcome.msg","Welcome"); - } + //* backup old settings + exec("for i in $config_dir/conf/*; do printf \$i\ ; cat \$i; printf '\n'; done 2>&1 >$config_dir/conf/.backup~"); + //* clean common unused settings + exec("rm $config_dir/conf/MinUID $config_dir/conf/PAMAuthentication $config_dir/conf/PureDB $config_dir/conf/UnixAuthentication 2> /dev/null"); + //* required for ftp traffic stats + file_put_contents("$config_dir/conf/AltLog","clf:/var/log/pure-ftpd/transfer.log"); + //* improves client compatibility + file_put_contents("$config_dir/conf/BrokenClientsCompatibility","yes"); + //* needed for ispconfig implementation + file_put_contents("$config_dir/conf/ChrootEveryone","yes"); + //* improves client compatibility + file_put_contents("$config_dir/conf/DisplayDotFiles","yes"); + //* improves performance + file_put_contents("$config_dir/conf/DontResolve","yes"); + //* complies with RFC2640 + file_put_contents("$config_dir/conf/FSCharset","UTF-8"); + //* provides welcome message + file_put_contents("$config_dir/conf/FortunesFile","$config_dir/welcome.msg"); + //* increases the clients limit from 50 (default) to 1024 + file_put_contents("$config_dir/conf/MaxClientsNumber","1024"); + //* prevents DoS attack from the same IP address + file_put_contents("$config_dir/conf/MaxClientsPerIP","64"); + //* needed for ispconfig implementation + file_put_contents("$config_dir/conf/MySQLConfigFile","$config_dir/db/mysql.conf"); + //* recommended for ispconfig implementation + file_put_contents("$config_dir/conf/NoAnonymous","yes"); + //* grade A encryption + file_put_contents("$config_dir/conf/TLSCipherSuite","ECDHE:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!RC4"); + //* hides implementation details + file_put_contents("$config_dir/welcome.msg","Welcome"); } public function configure_mydns() { -- GitLab From c0782338bdcb00318e1ebbb25ea2d52449b6664a Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:07:37 +0200 Subject: [PATCH 256/302] Add folder for hardening examples --- docs/hardening/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/hardening/.gitkeep diff --git a/docs/hardening/.gitkeep b/docs/hardening/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 -- GitLab From 6f27394dffe1c866cd504a8e3be19c4169a5223f Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:09:21 +0200 Subject: [PATCH 257/302] Add new file --- docs/hardening/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/hardening/README.md diff --git a/docs/hardening/README.md b/docs/hardening/README.md new file mode 100644 index 0000000000..4b6e5b38b5 --- /dev/null +++ b/docs/hardening/README.md @@ -0,0 +1 @@ +This folder will contain examples for further ISPC hardening (NwSEC) \ No newline at end of file -- GitLab From cd3565787f50f4e19f191620b159f29ef6e326c5 Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:09:55 +0200 Subject: [PATCH 258/302] Add new directory --- docs/hardening/anti-bruteforce/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/hardening/anti-bruteforce/.gitkeep diff --git a/docs/hardening/anti-bruteforce/.gitkeep b/docs/hardening/anti-bruteforce/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 -- GitLab From 8f5ad2cfb55ff8521d6b52ee372801848c62603f Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:11:01 +0200 Subject: [PATCH 259/302] Add new file --- docs/hardening/anti-bruteforce/wp-auth.conf | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docs/hardening/anti-bruteforce/wp-auth.conf diff --git a/docs/hardening/anti-bruteforce/wp-auth.conf b/docs/hardening/anti-bruteforce/wp-auth.conf new file mode 100644 index 0000000000..0c0700189f --- /dev/null +++ b/docs/hardening/anti-bruteforce/wp-auth.conf @@ -0,0 +1,2 @@ +[Definition] + failregex = ^ .* "POST /wp-login.php \ No newline at end of file -- GitLab From 3ddbd5237b5155f9892c038d7fc9100d7585d1ef Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:14:32 +0200 Subject: [PATCH 260/302] Add new file --- docs/hardening/anti-bruteforce/jail.local | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/hardening/anti-bruteforce/jail.local diff --git a/docs/hardening/anti-bruteforce/jail.local b/docs/hardening/anti-bruteforce/jail.local new file mode 100644 index 0000000000..fc7cc08d46 --- /dev/null +++ b/docs/hardening/anti-bruteforce/jail.local @@ -0,0 +1,10 @@ +# +# This does into / at the end of /etc/fail2ban/jail.local +# +[wp-auth] + enabled = true + filter = wp-auth + action = iptables-multiport[name=wp-auth, port="http,https"] + logpath = /var/www/clients/client*/web*/log/*.log + bantime = 1200 + maxretry = 5 \ No newline at end of file -- GitLab From 0e58aea6cd245fa116eb2c9e3f48e5f5f9448b6c Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:14:52 +0200 Subject: [PATCH 261/302] Update jail.local --- docs/hardening/anti-bruteforce/jail.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hardening/anti-bruteforce/jail.local b/docs/hardening/anti-bruteforce/jail.local index fc7cc08d46..486b3d8a04 100644 --- a/docs/hardening/anti-bruteforce/jail.local +++ b/docs/hardening/anti-bruteforce/jail.local @@ -1,5 +1,5 @@ # -# This does into / at the end of /etc/fail2ban/jail.local +# This goes into (or at the end of) /etc/fail2ban/jail.local # [wp-auth] enabled = true -- GitLab From 14127c8f7cc3110dbf1d2b41d974ef378e24ac02 Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:16:07 +0200 Subject: [PATCH 262/302] Add new directory --- docs/hardening/postfix-ldap/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/hardening/postfix-ldap/.gitkeep diff --git a/docs/hardening/postfix-ldap/.gitkeep b/docs/hardening/postfix-ldap/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 -- GitLab From 09e7d87e14c339274d048608bc868291383afb08 Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:19:59 +0200 Subject: [PATCH 263/302] Add new file --- docs/hardening/postfix-ldap/append_to_main.cf | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/hardening/postfix-ldap/append_to_main.cf diff --git a/docs/hardening/postfix-ldap/append_to_main.cf b/docs/hardening/postfix-ldap/append_to_main.cf new file mode 100644 index 0000000000..9ec2ac1366 --- /dev/null +++ b/docs/hardening/postfix-ldap/append_to_main.cf @@ -0,0 +1 @@ +relay_recipient_maps = hash:/etc/postfix/relay_recipients, ldap:/etc/postfix/ldap-aliases.cf \ No newline at end of file -- GitLab From 37cd136b274583a5d18209456dc167123d853d3c Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:21:16 +0200 Subject: [PATCH 264/302] Update append_to_main.cf --- .../postfix-ldap/{append_to_main.cf => add_to_main.cf} | 3 +++ 1 file changed, 3 insertions(+) rename docs/hardening/postfix-ldap/{append_to_main.cf => add_to_main.cf} (54%) diff --git a/docs/hardening/postfix-ldap/append_to_main.cf b/docs/hardening/postfix-ldap/add_to_main.cf similarity index 54% rename from docs/hardening/postfix-ldap/append_to_main.cf rename to docs/hardening/postfix-ldap/add_to_main.cf index 9ec2ac1366..71b77ed41e 100644 --- a/docs/hardening/postfix-ldap/append_to_main.cf +++ b/docs/hardening/postfix-ldap/add_to_main.cf @@ -1 +1,4 @@ +# +# This goes into /etc/postfix/main.cf in the section relay_recipient_maps +# relay_recipient_maps = hash:/etc/postfix/relay_recipients, ldap:/etc/postfix/ldap-aliases.cf \ No newline at end of file -- GitLab From f25c12922316b28d1ec0e2e61a836e006d3d6a2f Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:21:55 +0200 Subject: [PATCH 265/302] Add new file --- docs/hardening/postfix-ldap/ldap-aliases.cf | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/hardening/postfix-ldap/ldap-aliases.cf diff --git a/docs/hardening/postfix-ldap/ldap-aliases.cf b/docs/hardening/postfix-ldap/ldap-aliases.cf new file mode 100644 index 0000000000..f0bf47bf81 --- /dev/null +++ b/docs/hardening/postfix-ldap/ldap-aliases.cf @@ -0,0 +1,9 @@ +server_host = x.x.x.x +search_base = ou=xxx, dc=xxx, dc=xx +version = 3 +timeout = 10 +leaf_result_attribute = mail +bind_dn = user@domain +bind_pw = userpassword +query_filter = (mail=%s) +result_attribute = mail, addressToForward \ No newline at end of file -- GitLab From f60f661df43d0e29f2fac304b3cc3dfa67987d2e Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:23:19 +0200 Subject: [PATCH 266/302] Add new file --- docs/hardening/anti-bruteforce/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/hardening/anti-bruteforce/README.md diff --git a/docs/hardening/anti-bruteforce/README.md b/docs/hardening/anti-bruteforce/README.md new file mode 100644 index 0000000000..946543d4b8 --- /dev/null +++ b/docs/hardening/anti-bruteforce/README.md @@ -0,0 +1,8 @@ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + +This is an example to block WordPress Login Bruteforce Attacks. Further +description can also be found @ https://blog.nwsec.de/wordpress/?p=1112 + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file -- GitLab From 9e77e5cab90a6350a50073975715012d10ddfe0a Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:23:44 +0200 Subject: [PATCH 267/302] Update README.md --- docs/hardening/anti-bruteforce/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/hardening/anti-bruteforce/README.md b/docs/hardening/anti-bruteforce/README.md index 946543d4b8..2bb1a45561 100644 --- a/docs/hardening/anti-bruteforce/README.md +++ b/docs/hardening/anti-bruteforce/README.md @@ -1,8 +1,8 @@ -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This is an example to block WordPress Login Bruteforce Attacks. Further description can also be found @ https://blog.nwsec.de/wordpress/?p=1112 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file -- GitLab From fa1d71a58f5afdf0f06f5944c044560d5b7c13ba Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:29:33 +0200 Subject: [PATCH 268/302] Add new file --- docs/hardening/postfix-ldap/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/hardening/postfix-ldap/README.md diff --git a/docs/hardening/postfix-ldap/README.md b/docs/hardening/postfix-ldap/README.md new file mode 100644 index 0000000000..b256d4b7dd --- /dev/null +++ b/docs/hardening/postfix-ldap/README.md @@ -0,0 +1,17 @@ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +If mails get transparently forwarded to another mailserver, a mechanism to block +mail for invalid recipients makes sense, and drastically increaes the well-known +backscatter problem. + +LDAP queries are used to check for valid recipients, and forwards the mail, if +an entry for the user is found. + +For this to work, on Debian/GNU Linux, you also have to install postfix-ldap by + +apt install postfix-ldap + + +Further information can be found @ https://blog.nwsec.de/wordpress/?p=1031 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file -- GitLab From cbd22a15b47e1bd261b86eb750f7523aff393691 Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:32:42 +0200 Subject: [PATCH 269/302] Update README.md --- docs/hardening/README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/hardening/README.md b/docs/hardening/README.md index 4b6e5b38b5..60b0472234 100644 --- a/docs/hardening/README.md +++ b/docs/hardening/README.md @@ -1 +1,18 @@ -This folder will contain examples for further ISPC hardening (NwSEC) \ No newline at end of file ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +This folder contains examples for further ISPC hardening (done by NwSEC) + + +Currently, these are: + + +anti-bruteforce WordPress Login Anti-Bruteforce via fail2ban + +postfix-ldap Query for valid recipients via LDAP in a transparent + setup routing mails e.g. to the internal server + + +All these examples have been productively tested and implemented on various +Debian/GNU Linux based systems. + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file -- GitLab From 135d995a1077d53135f44514f797c4cdf8b0721e Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:33:18 +0200 Subject: [PATCH 270/302] Update README.md --- docs/hardening/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/hardening/README.md b/docs/hardening/README.md index 60b0472234..d4cfa15a21 100644 --- a/docs/hardening/README.md +++ b/docs/hardening/README.md @@ -6,12 +6,14 @@ This folder contains examples for further ISPC hardening (done by NwSEC) Currently, these are: + anti-bruteforce WordPress Login Anti-Bruteforce via fail2ban postfix-ldap Query for valid recipients via LDAP in a transparent setup routing mails e.g. to the internal server + All these examples have been productively tested and implemented on various Debian/GNU Linux based systems. -- GitLab From 3709073b1bc885c2067951669794a3789fee0ac0 Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 12 Oct 2017 13:35:04 +0200 Subject: [PATCH 271/302] Update wp-auth.conf --- docs/hardening/anti-bruteforce/wp-auth.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/hardening/anti-bruteforce/wp-auth.conf b/docs/hardening/anti-bruteforce/wp-auth.conf index 0c0700189f..2acad450ca 100644 --- a/docs/hardening/anti-bruteforce/wp-auth.conf +++ b/docs/hardening/anti-bruteforce/wp-auth.conf @@ -1,2 +1,5 @@ +# +# This goes into /etc/fail2ban/filter.d/wp-auth.conf +# [Definition] failregex = ^ .* "POST /wp-login.php \ No newline at end of file -- GitLab From 834e90656a7167454e8feb2453905cc61bfa9cea Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 18 Oct 2017 11:41:05 +0200 Subject: [PATCH 272/302] Fixed duplicate symantec.com ca records. --- install/sql/incremental/upd_dev_collection.sql | 4 +--- install/sql/ispconfig3.sql | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 44042f2381..da542af649 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -75,7 +75,6 @@ INSERT IGNORE INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_us (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Entrust', 'entrust.net', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Firmaprofesional', 'firmaprofesional.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'FNMT', 'fnmt.es', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GeoTrust (Symantec)', 'symantec.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GlobalSign', 'globalsign.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GoDaddy', 'godaddy.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Google Trust Services', 'pki.goog', 'Y', '', 0), @@ -94,10 +93,9 @@ INSERT IGNORE INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_us (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Sertifitseerimiskeskuse', 'sk.ee', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'StartCom', 'startcomca.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'SwissSign', 'swisssign.com', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Symantec', 'symantec.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Symantec / Thawte / GeoTrust', 'symantec.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'T-Systems', 'telesec.de', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Telia', 'telia.com', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Thawte (Symantec)', 'symantec.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Trustwave', 'trustwave.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Web.com', 'web.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WISeKey', 'wisekey.com', 'Y', '', 0), diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index fcd7a4d535..6ae06e3dbc 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -546,7 +546,6 @@ INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `s (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Entrust', 'entrust.net', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Firmaprofesional', 'firmaprofesional.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'FNMT', 'fnmt.es', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GeoTrust (Symantec)', 'symantec.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GlobalSign', 'globalsign.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GoDaddy', 'godaddy.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Google Trust Services', 'pki.goog', 'Y', '', 0), @@ -565,10 +564,9 @@ INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `s (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Sertifitseerimiskeskuse', 'sk.ee', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'StartCom', 'startcomca.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'SwissSign', 'swisssign.com', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Symantec', 'symantec.com', 'Y', '', 0), +(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Symantec / Thawte / GeoTrust', 'symantec.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'T-Systems', 'telesec.de', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Telia', 'telia.com', 'Y', '', 0), -(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Thawte (Symantec)', 'symantec.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Trustwave', 'trustwave.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Web.com', 'web.com', 'Y', '', 0), (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WISeKey', 'wisekey.com', 'Y', '', 0), -- GitLab From adcbfed5a39b45d1d44a3cd217583990ce077137 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 18 Oct 2017 12:59:48 +0200 Subject: [PATCH 273/302] Improved sql data update for caa records. --- install/sql/incremental/upd_dev_collection.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index da542af649..71f702ebf8 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -49,8 +49,9 @@ CREATE TABLE IF NOT EXISTS `dns_ssl_ca` ( ALTER TABLE `dns_ssl_ca` ADD UNIQUE(`ca_issue`); UPDATE `dns_ssl_ca` SET `ca_issue` = 'comodo.com' WHERE `ca_issue` = 'comodoca.com'; -UPDATE `dns_ssl_ca` SET `ca_issue` = 'geotrust.com' WHERE `ca_issue` = 'symantec.com'; -UPDATE `dns_ssl_ca` SET `ca_issue` = 'thawte.com' WHERE `ca_issue` = 'symantec.com'; +DELETE FROM `dns_ssl_ca` WHERE `ca_issue` = 'geotrust.com'; +DELETE FROM `dns_ssl_ca` WHERE `ca_issue` = 'thawte.com'; +UPDATE `dns_ssl_ca` SET `ca_name` = 'Symantec / Thawte / GeoTrust' WHERE `ca_issue` = 'symantec.com'; INSERT IGNORE INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES (NULL, 1, 1, 'riud', 'riud', '', 'Y', 'AC Camerfirma', 'camerfirma.com', 'Y', '', 0), -- GitLab From 166f9c6b3569d19bb51e5c52174533a4eac5bb2e Mon Sep 17 00:00:00 2001 From: Alexandre Alouit Date: Thu, 19 Oct 2017 11:37:40 +0200 Subject: [PATCH 274/302] bugfix return xmpp servers --- interface/lib/classes/remote.d/server.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/remote.d/server.inc.php b/interface/lib/classes/remote.d/server.inc.php index 7b56228b9c..8a793a7bbf 100644 --- a/interface/lib/classes/remote.d/server.inc.php +++ b/interface/lib/classes/remote.d/server.inc.php @@ -200,7 +200,7 @@ class remoting_server extends remoting { return false; } if (!empty($session_id) && !empty($server_id)) { - $sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, vserver_server, proxy_server, firewall_server FROM server WHERE server_id = ? LIMIT 1 "; + $sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, vserver_server, proxy_server, firewall_server, xmpp_server FROM server WHERE server_id = ? LIMIT 1 "; $all = $app->db->queryAllRecords($sql, $server_id); return $all; } else { -- GitLab From 94567ef455d8042049753b991c6296aa827de45d Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 23 Oct 2017 09:25:39 +0800 Subject: [PATCH 275/302] made this more universal --- docs/hardening/anti-bruteforce/jail.local | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/hardening/anti-bruteforce/jail.local b/docs/hardening/anti-bruteforce/jail.local index 486b3d8a04..cf9a981df2 100644 --- a/docs/hardening/anti-bruteforce/jail.local +++ b/docs/hardening/anti-bruteforce/jail.local @@ -5,6 +5,6 @@ enabled = true filter = wp-auth action = iptables-multiport[name=wp-auth, port="http,https"] - logpath = /var/www/clients/client*/web*/log/*.log + logpath = /var/log/ispconfig/httpd/*/*.log bantime = 1200 - maxretry = 5 \ No newline at end of file + maxretry = 5 -- GitLab From e77bb2036295cb8485173f91f7cad648c030653b Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 23 Oct 2017 12:26:40 +0800 Subject: [PATCH 276/302] utf8mb4 added for databases --- interface/web/sites/form/database.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/form/database.tform.php b/interface/web/sites/form/database.tform.php index aef56f5514..272756bcc0 100644 --- a/interface/web/sites/form/database.tform.php +++ b/interface/web/sites/form/database.tform.php @@ -157,7 +157,7 @@ $form["tabs"]['database'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => '', - 'value' => array('' => 'DB-Default', 'latin1' => 'Latin 1', 'utf8' => 'UTF-8') + 'value' => array('' => 'DB-Default', 'latin1' => 'Latin 1', 'utf8' => 'utf8', 'utf8mb4' => 'utf8mb4') ), 'remote_access' => array ( 'datatype' => 'VARCHAR', -- GitLab From cb688a1047339af6318087789b73fd34b2d1ce95 Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Mon, 23 Oct 2017 12:34:48 +0800 Subject: [PATCH 277/302] Better --- interface/web/sites/form/database.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/form/database.tform.php b/interface/web/sites/form/database.tform.php index 272756bcc0..4008547839 100644 --- a/interface/web/sites/form/database.tform.php +++ b/interface/web/sites/form/database.tform.php @@ -157,7 +157,7 @@ $form["tabs"]['database'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => '', - 'value' => array('' => 'DB-Default', 'latin1' => 'Latin 1', 'utf8' => 'utf8', 'utf8mb4' => 'utf8mb4') + 'value' => array('' => 'DB-Default', 'latin1' => 'Latin 1', 'utf8' => 'UTF-8', 'utf8mb4' => 'UTF-8 4-Byte') ), 'remote_access' => array ( 'datatype' => 'VARCHAR', -- GitLab From d1cf87217326754273532a84301a3af860aa8fff Mon Sep 17 00:00:00 2001 From: "ncomputers.org" Date: Sat, 28 Oct 2017 20:51:11 -0500 Subject: [PATCH 278/302] Replaced warning with error --- server/lib/classes/aps_installer.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 9b601d90b3..b2be236fa1 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -559,7 +559,7 @@ class ApsInstaller extends ApsBase $shell_ret_str = implode("\n", $shell_ret); // Although $shell_retcode might be 0, there can be PHP errors. Filter them: - if(substr_count($shell_ret_str, 'Warning: ') > 0) $shell_retcode = 1; + if(stripos($shell_ret_str,'error: ')!==false)$shell_retcode=1; // If an error has occurred, the return code is != 0 if($shell_retcode != 0) throw new Exception($shell_ret_str); -- GitLab From c56bb14414dba60bfa1435586c1133bb3b62a6b0 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Mon, 6 Nov 2017 15:15:46 +0100 Subject: [PATCH 279/302] more restrict permissions for dkim-keys --- server/plugins-available/mail_plugin_dkim.inc.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/mail_plugin_dkim.inc.php b/server/plugins-available/mail_plugin_dkim.inc.php index 6f042e9070..26de6ca4af 100755 --- a/server/plugins-available/mail_plugin_dkim.inc.php +++ b/server/plugins-available/mail_plugin_dkim.inc.php @@ -196,8 +196,21 @@ class mail_plugin_dkim { $public_key=''; foreach($pubkey as $values) $public_key=$public_key.$values."\n"; /* save the DKIM Public-key in dkim-dir */ - if ( $app->system->file_put_contents($key_file.'.public', $public_key) ) + if ( $app->system->file_put_contents($key_file.'.public', $public_key) ) { $app->log('Saved DKIM Public to '.$key_domain.'.', LOGLEVEL_DEBUG); + if($app->system->is_user('amavis')) { + $amavis_user='amavis'; + } elseif ($app->system->is_user('vscan')) { + $amavis_user='vscan'; + } + else { + $amavis_user=''; + } + if($amavis_user!='') { + $app->system->chown($key_file.'.private', $amavis_user); + $app->system->chmod($key_file.'.private', 0440); + } + } else $app->log('Unable to save DKIM Public to '.$key_domain.'.', LOGLEVEL_DEBUG); } else { $app->log('Unable to save DKIM Private-key to '.$key_file.'.private', LOGLEVEL_ERROR); -- GitLab From 90eb2eed6d28817d505ade6b15271328c354a8f0 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Mon, 6 Nov 2017 15:17:22 +0100 Subject: [PATCH 280/302] add ipv6 during "reconfigure permissions in database", too --- install/lib/installer_base.lib.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 104c343f24..aa5a609afd 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -497,15 +497,22 @@ class installer_base { //* insert the ispconfig user in the remote server $from_host = $conf['hostname']; - $from_ip = gethostbyname($conf['hostname']); $hosts[$from_host]['user'] = $conf['mysql']['master_ispconfig_user']; $hosts[$from_host]['db'] = $conf['mysql']['master_database']; $hosts[$from_host]['pwd'] = $conf['mysql']['master_ispconfig_password']; - $hosts[$from_ip]['user'] = $conf['mysql']['master_ispconfig_user']; - $hosts[$from_ip]['db'] = $conf['mysql']['master_database']; - $hosts[$from_ip]['pwd'] = $conf['mysql']['master_ispconfig_password']; + $ip_list=array(); + $ip_rec=dns_get_record($conf['hostname'], DNS_A + DNS_AAAA); + if(!empty($ip_rec)) foreach($ip_rec as $rec => $ip) $ip_list[]=@(isset($ip['ip']))?$ip['ip']:$ip['ipv6']; + + if(!empty($ip_list)) { + foreach($ip_list as $ip) { + $hosts[$ip]['user'] = $conf['mysql']['master_ispconfig_user']; + $hosts[$ip]['db'] = $conf['mysql']['master_database']; + $hosts[$ip]['pwd'] = $conf['mysql']['master_ispconfig_password']; + } + } } else{ /* * it is NOT a master-slave - Setup so we have to find out all clients and their -- GitLab From 79b50f46e5a3a82e0f722d7133246ef010e9cdd6 Mon Sep 17 00:00:00 2001 From: Jesse Norell Date: Wed, 20 Dec 2017 01:02:40 +0100 Subject: [PATCH 281/302] iterate_query should not include disabled accounts --- install/tpl/debian6_dovecot-sql.conf.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tpl/debian6_dovecot-sql.conf.master b/install/tpl/debian6_dovecot-sql.conf.master index e05330dc26..496e9965df 100644 --- a/install/tpl/debian6_dovecot-sql.conf.master +++ b/install/tpl/debian6_dovecot-sql.conf.master @@ -19,4 +19,4 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers -# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}' +# iterate_query = SELECT email as user FROM mail_user WHERE `disable%Ls` = 'n' AND server_id = '{server_id}' -- GitLab From 5f532fce3c5f3ec1af67210b84808e88ad7dc043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=BCrmann?= Date: Mon, 8 Jan 2018 14:47:00 +0100 Subject: [PATCH 282/302] Add selection to user-mailfilter editor --- interface/web/mail/form/mail_user_filter.tform.php | 2 +- interface/web/mail/lib/lang/de_mail_user_filter.lng | 1 + interface/web/mail/lib/lang/en_mail_user_filter.lng | 1 + interface/web/mailuser/lib/lang/de_mail_user_filter.lng | 1 + interface/web/mailuser/lib/lang/en_mail_user_filter.lng | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/interface/web/mail/form/mail_user_filter.tform.php b/interface/web/mail/form/mail_user_filter.tform.php index 76b54feb09..02dfa59b47 100644 --- a/interface/web/mail/form/mail_user_filter.tform.php +++ b/interface/web/mail/form/mail_user_filter.tform.php @@ -88,7 +88,7 @@ $form["tabs"]['filter'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => '', - 'value' => array('Subject' => 'subject_txt', 'From'=>'from_txt', 'To'=>'to_txt') + 'value' => array('Subject' => 'subject_txt', 'From'=>'from_txt', 'To'=>'to_txt', 'Detail'=>'detail_txt') ), 'op' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/mail/lib/lang/de_mail_user_filter.lng b/interface/web/mail/lib/lang/de_mail_user_filter.lng index e951d18c6b..d789c025d7 100644 --- a/interface/web/mail/lib/lang/de_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/de_mail_user_filter.lng @@ -27,4 +27,5 @@ $wb['reject_txt'] = 'Abweisen'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Verschiebe nach'; $wb['mark_read_txt'] = 'Als gelesen markieren'; +$wb['detail_txt'] = 'Detail-Angabe des Empfängers (user+detail@domain.com)'; ?> diff --git a/interface/web/mail/lib/lang/en_mail_user_filter.lng b/interface/web/mail/lib/lang/en_mail_user_filter.lng index 6bec7601c3..6f1a62ae13 100644 --- a/interface/web/mail/lib/lang/en_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/en_mail_user_filter.lng @@ -27,4 +27,5 @@ $wb['reject_txt'] = 'Reject'; $wb['stop_txt'] = 'Stop'; $wb['move_to_txt'] = 'Move to'; $wb['mark_read_txt'] = 'Mark as read'; +$wb['detail_txt'] = 'Detail part in recipient (user+detail@domain.com)'; ?> diff --git a/interface/web/mailuser/lib/lang/de_mail_user_filter.lng b/interface/web/mailuser/lib/lang/de_mail_user_filter.lng index 1665ba14d2..ac4016713b 100644 --- a/interface/web/mailuser/lib/lang/de_mail_user_filter.lng +++ b/interface/web/mailuser/lib/lang/de_mail_user_filter.lng @@ -18,4 +18,5 @@ $wb['begins_with_txt'] = 'Startet mit'; $wb['ends_with_txt'] = 'Endet mit'; $wb['move_to_txt'] = 'Verschieben nach'; $wb['delete_txt'] = 'Löschen'; +$wb['detail_txt'] = 'Detail-Angabe des Empfängers (user+detail@domain.com)'; ?> diff --git a/interface/web/mailuser/lib/lang/en_mail_user_filter.lng b/interface/web/mailuser/lib/lang/en_mail_user_filter.lng index 23451b74db..652d509741 100644 --- a/interface/web/mailuser/lib/lang/en_mail_user_filter.lng +++ b/interface/web/mailuser/lib/lang/en_mail_user_filter.lng @@ -18,4 +18,5 @@ $wb['begins_with_txt'] = 'Begins with'; $wb['ends_with_txt'] = 'Ends with'; $wb['move_to_txt'] = 'Move to'; $wb['delete_txt'] = 'Delete'; +$wb['detail_txt'] = 'Detail part in recipient (user+detail@domain.com)'; ?> -- GitLab From c44c12ff1cf788ad7cba0690686377d1d1de16ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=BCrmann?= Date: Mon, 8 Jan 2018 14:48:08 +0100 Subject: [PATCH 283/302] Handle new filter source type "Detail" --- .../plugins/mail_user_filter_plugin.inc.php | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/interface/lib/plugins/mail_user_filter_plugin.inc.php b/interface/lib/plugins/mail_user_filter_plugin.inc.php index 5b898f84c6..a4e973973e 100644 --- a/interface/lib/plugins/mail_user_filter_plugin.inc.php +++ b/interface/lib/plugins/mail_user_filter_plugin.inc.php @@ -148,17 +148,20 @@ class mail_user_filter_plugin { } $content .= 'if size :over '.intval($page_form->dataRecord["searchterm"]).$unit.' {'."\n"; } else { - - if($page_form->dataRecord["source"] == 'Header') { - $parts = explode(':',trim($page_form->dataRecord["searchterm"])); - $page_form->dataRecord["source"] = trim($parts[0]); - unset($parts[0]); - $page_form->dataRecord["searchterm"] = trim(implode(':',$parts)); - unset($parts); + if($page_form->dataRecord["source"] == 'Detail') { + $content .= 'if envelope :detail :regex "to" ["'; + } else { + if($page_form->dataRecord["source"] == 'Header') { + $parts = explode(':',trim($page_form->dataRecord["searchterm"])); + $page_form->dataRecord["source"] = trim($parts[0]); + unset($parts[0]); + $page_form->dataRecord["searchterm"] = trim(implode(':',$parts)); + unset($parts); + } + + $content .= 'if header :regex ["'.strtolower($page_form->dataRecord["source"]).'"] ["'; } - $content .= 'if header :regex ["'.strtolower($page_form->dataRecord["source"]).'"] ["'; - $searchterm = preg_quote($page_form->dataRecord["searchterm"]); $searchterm = str_replace( array( -- GitLab From d8390bfbb44a661da36f9c3b7c3d7420b4d69f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=BCrmann?= Date: Mon, 8 Jan 2018 14:48:45 +0100 Subject: [PATCH 284/302] Require modules for :details --- server/conf/sieve_filter.master | 2 +- server/conf/sieve_filter_1.2.master | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/conf/sieve_filter.master b/server/conf/sieve_filter.master index 43dfeac052..bfd75c4d43 100644 --- a/server/conf/sieve_filter.master +++ b/server/conf/sieve_filter.master @@ -1,4 +1,4 @@ -require ["fileinto", "regex", "vacation", "imap4flags"]; +require ["fileinto", "regex", "vacation", "imap4flags", "envelope", "subaddress"]; # Send a copy of email to diff --git a/server/conf/sieve_filter_1.2.master b/server/conf/sieve_filter_1.2.master index 7580e190dc..47370ec0a9 100644 --- a/server/conf/sieve_filter_1.2.master +++ b/server/conf/sieve_filter_1.2.master @@ -1,4 +1,4 @@ -require ["fileinto", "regex", "date", "relational", "vacation", "imap4flags"]; +require ["fileinto", "regex", "date", "relational", "vacation", "imap4flags", "envelope", "subaddress"]; # Send a copy of email to -- GitLab From 8ef8a7d211f53bfea1a0418f4dff859cf277c310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=BCrmann?= Date: Mon, 8 Jan 2018 14:50:16 +0100 Subject: [PATCH 285/302] Tell postfix to pass original_recipient to dovecot (required to extract envelope :detail) --- install/dist/lib/debian60.lib.php | 2 +- install/dist/lib/fedora.lib.php | 2 +- install/dist/lib/gentoo.lib.php | 2 +- install/dist/lib/opensuse.lib.php | 2 +- install/lib/installer_base.lib.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php index 57fb193440..ecf3db3a4b 100644 --- a/install/dist/lib/debian60.lib.php +++ b/install/dist/lib/debian60.lib.php @@ -61,7 +61,7 @@ class installer extends installer_base { } //* Configure master.cf and add a line for deliver $content = rf($conf["postfix"]["config_dir"].'/master.cf'); - $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}'."\n"; + $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -a ${original_recipient}'."\n"; af($config_dir.'/master.cf', $deliver_content); unset($content); unset($deliver_content); diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index f1c8d67204..70bed24d10 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -394,7 +394,7 @@ class installer_dist extends installer_base { } //* Configure master.cf and add a line for deliver $content = rf($conf["postfix"]["config_dir"].'/master.cf'); - $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}'."\n"; + $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -a ${original_recipient}'."\n"; af($conf["postfix"]["config_dir"].'/master.cf', $deliver_content); unset($content); unset($deliver_content); diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index b3cfc20719..46bd662535 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -303,7 +303,7 @@ class installer extends installer_base } //* Configure master.cf and add a line for deliver $content = rf($conf["postfix"]["config_dir"].'/master.cf'); - $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DROhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}'."\n"; + $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DROhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -a ${original_recipient}'."\n"; af($config_dir.'/master.cf', $deliver_content); unset($content); unset($deliver_content); diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index f991c77d2b..598f98ec43 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -404,7 +404,7 @@ class installer_dist extends installer_base { } //* Configure master.cf and add a line for deliver $content = rf($conf["postfix"]["config_dir"].'/master.cf'); - $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}'."\n"; + $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -a ${original_recipient}'."\n"; af($conf["postfix"]["config_dir"].'/master.cf', $deliver_content); unset($content); unset($deliver_content); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 95e0d9f5a5..a504b3b255 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1322,7 +1322,7 @@ class installer_base { } //* Configure master.cf and add a line for deliver $content = rf($conf["postfix"]["config_dir"].'/master.cf'); - $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}'."\n"; + $deliver_content = 'dovecot unix - n n - - pipe'."\n".' flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -a ${original_recipient}'."\n"; af($config_dir.'/master.cf', $deliver_content); unset($content); unset($deliver_content); -- GitLab From 5e97434d8dfa745dc763a607c3d80672e559b03e Mon Sep 17 00:00:00 2001 From: freeos Date: Sun, 14 Jan 2018 12:11:21 +0100 Subject: [PATCH 286/302] Added HTTP2 for Apache --- server/conf/vhost.conf.master | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 55fe40f987..812e8e0fcc 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -13,6 +13,12 @@ + + + Protocols h2 h2c http/1.1 + + + DocumentRoot -- GitLab From cb98657fd867792f3b7b33c2f2f62769061a56f8 Mon Sep 17 00:00:00 2001 From: freeos Date: Sun, 14 Jan 2018 12:17:28 +0100 Subject: [PATCH 287/302] Added HTTP2 per default for ISPConfig Controlpanel --- install/tpl/apache_ispconfig.vhost.master | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master index ffbb7c03de..bcdc8b76f9 100644 --- a/install/tpl/apache_ispconfig.vhost.master +++ b/install/tpl/apache_ispconfig.vhost.master @@ -8,6 +8,9 @@ > ServerAdmin webmaster@localhost + + Protocols h2 h2c http/1.1 + -- GitLab From 113a6edeeb8232193715b62fc5621309cc2a97c1 Mon Sep 17 00:00:00 2001 From: freeos Date: Sun, 14 Jan 2018 12:27:16 +0100 Subject: [PATCH 288/302] Improved Security by restrict Bind to tell the web nothing about its version --- install/tpl/named.conf.options.master | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/tpl/named.conf.options.master b/install/tpl/named.conf.options.master index 37182dfba9..7f89fa4ee5 100644 --- a/install/tpl/named.conf.options.master +++ b/install/tpl/named.conf.options.master @@ -22,8 +22,7 @@ options { dnssec-validation yes; dnssec-lookaside auto; - version "DNS managed by ISPConfig"; - + version "DNS-Server"; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; }; -- GitLab From a7f817ff99346088cbb9ce0d072a775a506669fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20V=C3=B6lker?= Date: Tue, 16 Jan 2018 11:04:14 +0100 Subject: [PATCH 289/302] Fix for #4335 - localhost hardcoded in mysql-virtual_outgoing_bcc.cf.master --- install/tpl/mysql-virtual_outgoing_bcc.cf.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tpl/mysql-virtual_outgoing_bcc.cf.master b/install/tpl/mysql-virtual_outgoing_bcc.cf.master index af062f66b2..bf3ddbff01 100644 --- a/install/tpl/mysql-virtual_outgoing_bcc.cf.master +++ b/install/tpl/mysql-virtual_outgoing_bcc.cf.master @@ -5,4 +5,4 @@ table = mail_user select_field = sender_cc where_field = email additional_conditions = and postfix = 'y' and disabledeliver = 'n' and disablesmtp = 'n' and sender_cc != '' -hosts = 127.0.0.1 \ No newline at end of file +hosts = {mysql_server_ip} -- GitLab From b22ec4ad7f1cbbf05f46f594b61e01ffd271aebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20V=C3=B6lker?= Date: Tue, 16 Jan 2018 11:04:37 +0100 Subject: [PATCH 290/302] Removed unused file --- install/tpl/mysql-virtual_outgoing_bcc.cf | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 install/tpl/mysql-virtual_outgoing_bcc.cf diff --git a/install/tpl/mysql-virtual_outgoing_bcc.cf b/install/tpl/mysql-virtual_outgoing_bcc.cf deleted file mode 100644 index dfeb04b553..0000000000 --- a/install/tpl/mysql-virtual_outgoing_bcc.cf +++ /dev/null @@ -1,8 +0,0 @@ -user = {mysql_server_ispconfig_user} -password = {mysql_server_ispconfig_password} -dbname = {mysql_server_database} -table = mail_user -select_field = sender_cc -where_field = email -additional_conditions = and postfix = 'y' and disabledeliver = 'n' and disables$ -hosts = 127.0.0.1 \ No newline at end of file -- GitLab From bbede673cfb93fcdd94aebdb0cd87a6ef26d9fc7 Mon Sep 17 00:00:00 2001 From: Ederson Mora Date: Thu, 18 Jan 2018 14:06:48 +0100 Subject: [PATCH 291/302] Update 100-monitor_openvz.inc.php --- server/lib/classes/cron.d/100-monitor_openvz.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/lib/classes/cron.d/100-monitor_openvz.inc.php b/server/lib/classes/cron.d/100-monitor_openvz.inc.php index 30b51b4b5f..adc092ec95 100644 --- a/server/lib/classes/cron.d/100-monitor_openvz.inc.php +++ b/server/lib/classes/cron.d/100-monitor_openvz.inc.php @@ -69,7 +69,7 @@ class cronjob_monitor_openvz extends cronjob { /* Fetch the data into a array */ - $app->load(openvz_tools); + $app->load('openvz_tools'); $openVzTools = new openvz_tools(); $data = $openVzTools->getOpenVzVeInfo(); @@ -98,7 +98,7 @@ class cronjob_monitor_openvz extends cronjob { /* Fetch the data into a array */ - $app->load(openvz_tools); + $app->load('openvz_tools'); $openVzTools = new openvz_tools(); $data = $openVzTools->getOpenVzVeBeanCounter(); -- GitLab From 6f8ed7d8f1fe783a0d8f2490353fec10b6da6ae2 Mon Sep 17 00:00:00 2001 From: Ederson Mora Date: Thu, 18 Jan 2018 14:13:39 +0100 Subject: [PATCH 292/302] Update cron.inc.php --- server/lib/classes/cron.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/lib/classes/cron.inc.php b/server/lib/classes/cron.inc.php index 48ca093739..374cfcc4e0 100644 --- a/server/lib/classes/cron.inc.php +++ b/server/lib/classes/cron.inc.php @@ -264,10 +264,16 @@ class cron { if(!array_key_exists($sField, $this->_aValidValues)) return false; reset($this->_aValidValues[$sField]); + /* while(($cur = each($this->_aValidValues[$sField])) !== false) { if($bIncludeCurrent == true && $cur['value'] >= $iValue) return $cur['value']; elseif($cur['value'] > $iValue) return $cur['value']; } + */ + foreach($this->_aValidValues[$sField] as $key => $value) { + if($bIncludeCurrent == true && $value >= $iValue) return $value; + elseif($value > $iValue) return $value; + } return reset($this->_aValidValues[$sField]); } -- GitLab From 15ddf6db88224ce79e69998e024621d009ecfa4d Mon Sep 17 00:00:00 2001 From: Ederson Mora Date: Thu, 18 Jan 2018 14:15:44 +0100 Subject: [PATCH 293/302] Update cron.inc.php --- server/lib/classes/cron.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/lib/classes/cron.inc.php b/server/lib/classes/cron.inc.php index 374cfcc4e0..d426cfb432 100644 --- a/server/lib/classes/cron.inc.php +++ b/server/lib/classes/cron.inc.php @@ -271,9 +271,9 @@ class cron { } */ foreach($this->_aValidValues[$sField] as $key => $value) { - if($bIncludeCurrent == true && $value >= $iValue) return $value; - elseif($value > $iValue) return $value; - } + if($bIncludeCurrent == true && $value >= $iValue) return $value; + elseif($value > $iValue) return $value; + } return reset($this->_aValidValues[$sField]); } -- GitLab From 7be68d5edf1e1d8042f57b70bc76fd35c113bc15 Mon Sep 17 00:00:00 2001 From: Ederson Mora Date: Thu, 18 Jan 2018 15:25:59 +0100 Subject: [PATCH 294/302] Update cron.sh --- server/cron.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/cron.sh b/server/cron.sh index 98f0ddfd30..05fa10ef0d 100644 --- a/server/cron.sh +++ b/server/cron.sh @@ -10,7 +10,7 @@ if [ -f /usr/local/ispconfig/server/lib/php.ini ]; then fi cd /usr/local/ispconfig/server -/usr/bin/php -q \ +$(which php) -q \ -d disable_classes= \ -d disable_functions= \ -d open_basedir= \ -- GitLab From b683aebcd23ddbfef2137653889429230e0d3313 Mon Sep 17 00:00:00 2001 From: Ederson Mora Date: Thu, 18 Jan 2018 15:37:25 +0100 Subject: [PATCH 295/302] Update cron.sh --- server/cron.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/cron.sh b/server/cron.sh index 98f0ddfd30..58ddc67ff2 100644 --- a/server/cron.sh +++ b/server/cron.sh @@ -10,8 +10,9 @@ if [ -f /usr/local/ispconfig/server/lib/php.ini ]; then fi cd /usr/local/ispconfig/server -/usr/bin/php -q \ +$(which php) -q \ -d disable_classes= \ -d disable_functions= \ -d open_basedir= \ /usr/local/ispconfig/server/cron.php + \ No newline at end of file -- GitLab From 19cf886951c12791f3323d4772a5a68cac8f3df5 Mon Sep 17 00:00:00 2001 From: Ederson Mora Date: Thu, 18 Jan 2018 15:53:20 +0100 Subject: [PATCH 296/302] Update cron.inc.php --- server/lib/classes/cron.inc.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/lib/classes/cron.inc.php b/server/lib/classes/cron.inc.php index d426cfb432..3a8ba2c6a6 100644 --- a/server/lib/classes/cron.inc.php +++ b/server/lib/classes/cron.inc.php @@ -264,12 +264,7 @@ class cron { if(!array_key_exists($sField, $this->_aValidValues)) return false; reset($this->_aValidValues[$sField]); - /* - while(($cur = each($this->_aValidValues[$sField])) !== false) { - if($bIncludeCurrent == true && $cur['value'] >= $iValue) return $cur['value']; - elseif($cur['value'] > $iValue) return $cur['value']; - } - */ + foreach($this->_aValidValues[$sField] as $key => $value) { if($bIncludeCurrent == true && $value >= $iValue) return $value; elseif($value > $iValue) return $value; -- GitLab From b2f74d063ccffc75cab20a00b94b5d59e8437613 Mon Sep 17 00:00:00 2001 From: Ederson Mora Date: Thu, 18 Jan 2018 18:24:17 +0100 Subject: [PATCH 297/302] Update simplepie.inc.php --- interface/lib/classes/simplepie.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/simplepie.inc.php b/interface/lib/classes/simplepie.inc.php index 5d36c09d34..ddba5af4c7 100644 --- a/interface/lib/classes/simplepie.inc.php +++ b/interface/lib/classes/simplepie.inc.php @@ -13338,7 +13338,7 @@ class SimplePie_Parse_Date } // Convert the number of seconds to an integer, taking decimals into account - $second = round($match[6] + $match[7] / pow(10, strlen($match[7]))); + $second = round($match[6] + $match[7] / pow(10, (int)strlen($match[7]))); return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone; } -- GitLab From 55be408c7ab5f590b9705194fd7a6c0bfc68e8f4 Mon Sep 17 00:00:00 2001 From: Ederson Mora Date: Thu, 18 Jan 2018 20:15:00 +0100 Subject: [PATCH 298/302] Update simplepie.inc.php --- interface/lib/classes/simplepie.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/simplepie.inc.php b/interface/lib/classes/simplepie.inc.php index ddba5af4c7..868c6bdbc9 100644 --- a/interface/lib/classes/simplepie.inc.php +++ b/interface/lib/classes/simplepie.inc.php @@ -13338,7 +13338,7 @@ class SimplePie_Parse_Date } // Convert the number of seconds to an integer, taking decimals into account - $second = round($match[6] + $match[7] / pow(10, (int)strlen($match[7]))); + $second = round($match[6] + (float)$match[7] / pow(10, (int)strlen($match[7]))); return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone; } -- GitLab From 67c1731d08c0576f501a2d6c8eb45bd300b56dc7 Mon Sep 17 00:00:00 2001 From: iMZ Date: Wed, 7 Feb 2018 12:18:18 +0100 Subject: [PATCH 299/302] Update limits.php - add information of assigned and total quota for web, email, database --- interface/web/dashboard/dashlets/limits.php | 34 ++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index d58c3eb8e0..a2f13015d4 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -8,6 +8,11 @@ class dashlet_limits { $limits = array(); /* Limits to be shown*/ + + $limits[] = array('field' => 'limit_mailquota', + 'db_table' => 'mail_user', + 'db_where' => '', + 'q_type' => 'quota'); $limits[] = array('field' => 'limit_maildomain', 'db_table' => 'mail_domain', @@ -61,6 +66,11 @@ class dashlet_limits { 'db_table' => 'spamfilter_policy', 'db_where' => ""); + $limits[] = array('field' => 'limit_web_quota', + 'db_table' => 'web_domain', + 'db_where' => '', + 'q_type' => 'hd_quota'); + $limits[] = array('field' => 'limit_web_domain', 'db_table' => 'web_domain', 'db_where' => "type = 'vhost'"); @@ -93,6 +103,11 @@ class dashlet_limits { 'db_table' => 'dns_rr', 'db_where' => ""); + $limits[] = array('field' => 'limit_database_quota', + 'db_table' => 'web_database', + 'db_where' => '', + 'q_type' => 'database_quota'); + $limits[] = array('field' => 'limit_database', 'db_table' => 'web_database', 'db_where' => ""); @@ -143,7 +158,11 @@ class dashlet_limits { } if($value != 0 || $value == $wb['unlimited_txt']) { $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; - $usage = $this->_get_limit_usage($limit); + if($limit['q_type']!=''){ + $usage = $this->_get_assigned_quota($limit) . " MB"; + $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value . " MB"; + } + else $usage = $this->_get_limit_usage($limit); $percentage = ($value == '-1' || $value == 0 ? 0 : round(100 * $usage / $value)); $rows[] = array('field' => $field, 'field_txt' => $wb[$field.'_txt'], @@ -172,6 +191,19 @@ class dashlet_limits { return $rec['number']; } + + function _get_assigned_quota($limit) { + global $app; + + $sql = "SELECT sum(??) as number FROM ?? WHERE "; + if($limit['db_where'] != '') $sql .= $limit['db_where']." AND "; + $sql .= $app->tform->getAuthSQL('r'); + $rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']); + if($limit['db_table']=='mail_user') $quotaMB = $rec['number'] / 1048576; // Mail quota is in bytes, must be converted to MB + else $quotaMB = $rec['number']; + return $quotaMB; + + } } -- GitLab From a278007d936cfbadd7c096dd984dda506a94bfec Mon Sep 17 00:00:00 2001 From: iMZ Date: Wed, 7 Feb 2018 12:19:37 +0100 Subject: [PATCH 300/302] Update en_dashlet_limits.lng --- interface/web/dashboard/lib/lang/en_dashlet_limits.lng | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interface/web/dashboard/lib/lang/en_dashlet_limits.lng b/interface/web/dashboard/lib/lang/en_dashlet_limits.lng index 3f0ce2f43c..5d504c8e9b 100644 --- a/interface/web/dashboard/lib/lang/en_dashlet_limits.lng +++ b/interface/web/dashboard/lib/lang/en_dashlet_limits.lng @@ -28,4 +28,7 @@ $wb["limit_webdav_user_txt"] = 'Number of Webdav users'; $wb["limit_client_txt"] = 'Number of Clients'; $wb["limit_database_txt"] = 'Number of Databases'; $wb['limit_domain_txt'] = 'Number of Domains'; +$wb['limit_mailquota_txt'] = 'Assigned mailbox quota'; +$wb['limit_web_quota_txt'] = 'Assigned web quota'; +$wb['limit_database_quota_txt'] = 'Assigned database quota'; ?> -- GitLab From 09b0e5314adb1a7af5f0b029e46b5d2a60df9b69 Mon Sep 17 00:00:00 2001 From: iMZ Date: Wed, 7 Feb 2018 20:37:28 +0100 Subject: [PATCH 301/302] Update limits.php - added where statament for filter unlimited quota --- interface/web/dashboard/dashlets/limits.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index a2f13015d4..0172b9a7a7 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -11,7 +11,7 @@ class dashlet_limits { $limits[] = array('field' => 'limit_mailquota', 'db_table' => 'mail_user', - 'db_where' => '', + 'db_where' => 'quota > 0', /* Count only posive quota, negative value -1 si unlimited */ 'q_type' => 'quota'); $limits[] = array('field' => 'limit_maildomain', @@ -68,7 +68,7 @@ class dashlet_limits { $limits[] = array('field' => 'limit_web_quota', 'db_table' => 'web_domain', - 'db_where' => '', + 'db_where' => 'hd_quota > 0', /* Count only posive quota, negative value -1 si unlimited */ 'q_type' => 'hd_quota'); $limits[] = array('field' => 'limit_web_domain', @@ -105,7 +105,7 @@ class dashlet_limits { $limits[] = array('field' => 'limit_database_quota', 'db_table' => 'web_database', - 'db_where' => '', + 'db_where' => 'database_quota > 0', /* Count only posive quota, negative value -1 si unlimited */ 'q_type' => 'database_quota'); $limits[] = array('field' => 'limit_database', -- GitLab From 9a04c3269357e1017926b9e99bf483dfa7b5b647 Mon Sep 17 00:00:00 2001 From: iMZ Date: Wed, 7 Feb 2018 20:47:54 +0100 Subject: [PATCH 302/302] Update limits.php - Added where statament, not count negative value of quota, becouse negative value (-1) means unlimited sum of "500" "1500" "-1" must be 2000, not 1999 - change comments --- interface/web/dashboard/dashlets/limits.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 0172b9a7a7..62cd2db358 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -11,7 +11,7 @@ class dashlet_limits { $limits[] = array('field' => 'limit_mailquota', 'db_table' => 'mail_user', - 'db_where' => 'quota > 0', /* Count only posive quota, negative value -1 si unlimited */ + 'db_where' => 'quota > 0', /* Count only posive value of quota, negative value -1 is unlimited */ 'q_type' => 'quota'); $limits[] = array('field' => 'limit_maildomain', @@ -68,7 +68,7 @@ class dashlet_limits { $limits[] = array('field' => 'limit_web_quota', 'db_table' => 'web_domain', - 'db_where' => 'hd_quota > 0', /* Count only posive quota, negative value -1 si unlimited */ + 'db_where' => 'hd_quota > 0', /* Count only posive value of quota, negative value -1 is unlimited */ 'q_type' => 'hd_quota'); $limits[] = array('field' => 'limit_web_domain', @@ -105,7 +105,7 @@ class dashlet_limits { $limits[] = array('field' => 'limit_database_quota', 'db_table' => 'web_database', - 'db_where' => 'database_quota > 0', /* Count only posive quota, negative value -1 si unlimited */ + 'db_where' => 'database_quota > 0', /* Count only posive value of quota, negative value -1 is unlimited */ 'q_type' => 'database_quota'); $limits[] = array('field' => 'limit_database', -- GitLab